From 4d64e63cbd3edb028d57906998ac0114cc85edaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 30 Oct 2021 03:41:51 +0200 Subject: [PATCH] Datetime, Decorator --- README.md | 5 +++-- index.html | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index abb9364..b6c6fb5 100644 --- a/README.md +++ b/README.md @@ -648,7 +648,7 @@ from dateutil.tz import UTC, tzlocal, gettz, datetime_exists, resolve_imaginary >>> dt.strftime("%A, %dth of %B '%y, %I:%M%p %Z") "Thursday, 14th of May '15, 11:39PM UTC+02:00" ``` -* **When parsing, `'%z'` also accepts `'±HH:MM'`.** +* **`'%Z'` only accepts `'UTC/GMT'` and local timezone's code. `'%z'` also accepts `'±HH:MM'`.** * **For abbreviated weekday and month use `'%a'` and `'%b'`.** ### Arithmetics @@ -881,7 +881,8 @@ def get_counter(): Decorator --------- -**A decorator takes a function, adds some functionality and returns it.** +* **A decorator takes a function, adds some functionality and returns it.** +* **It can be any [callable](#callable), but is usually implemented as a function that returns a [closure](#closure).** ```python @decorator_name diff --git a/index.html b/index.html index e1da59e..48e510d 100644 --- a/index.html +++ b/index.html @@ -226,7 +226,7 @@ pre.prettyprint {
- +
@@ -730,7 +730,7 @@ to_exclusive = <range>.stop

Arithmetics

<D/DT>   = <D/DT>   ± <TD>                  # Returned datetime can fall into missing hour.
@@ -897,7 +897,10 @@ creature = Creature(point, direction)
 >>> counter(), counter(), counter()
 (1, 2, 3)
 
-

#Decorator

A decorator takes a function, adds some functionality and returns it.

@decorator_name
+

#Decorator

    +
  • A decorator takes a function, adds some functionality and returns it.
  • +
  • It can be any callable, but is usually implemented as a function that returns a closure.
  • +
@decorator_name
 def function_that_gets_passed_to_decorator():
     ...
 
@@ -3017,7 +3020,7 @@ $ pyinstaller script.py --add-data '<path>:.'