From 08a4c4d3c1ca65feac05efae9c3e55acafd57af3 Mon Sep 17 00:00:00 2001 From: fspitzba Date: Tue, 13 Oct 2020 22:35:14 +0200 Subject: [PATCH] changed gitignore, corrected tabs, added some comments --- .gitignore | 3 ++- HSMensaW_botA.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bcea61f..ab96697 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,7 @@ modules.xml # End of https://www.gitignore.io/api/pycharm+iml *.log +__pycache__/ config.json config-devel.json -bot_test.py \ No newline at end of file +bot_test.py diff --git a/HSMensaW_botA.py b/HSMensaW_botA.py index 5343508..1222bff 100644 --- a/HSMensaW_botA.py +++ b/HSMensaW_botA.py @@ -1,6 +1,14 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -import asyncio + +# since 3.5: type hints +# def ( : + +import asyncio # write concurrent code (not threading. not multiprocessing) +# it's cooperative multitasking, no parallelism +# coroutines: suspend execution before return and pass control to another coroutine +# use await only in async functions + import datetime import json import signal @@ -26,6 +34,7 @@ from telepot.namedtuple import InlineKeyboardMarkup, InlineKeyboardButton class Essen: + """ Test Docstring """ def __init__(self, name, preis, kategorie): self.name = name self.preis = preis