diff --git a/README.md b/README.md index dcdbbff..bea9ecb 100644 --- a/README.md +++ b/README.md @@ -2002,7 +2002,7 @@ with ThreadPoolExecutor(max_workers=None) as executor: ``` ### Queue -* **A thread-safe FIFO queue. For LIFO queue use 'queue.LifoQueue'.** +**A thread-safe FIFO queue. For LIFO queue use LifoQueue.** ```python from queue import Queue = Queue(maxsize=0) diff --git a/index.html b/index.html index de0e6a7..27503d1 100644 --- a/index.html +++ b/index.html @@ -1761,9 +1761,7 @@ lock.release()
<bool> = <Future>.done()     # Checks if thread has finished executing.
 <obj>  = <Future>.result()   # Waits for thread to finish and returns result.
 
-

Queue

from queue import Queue
+

Queue

A thread-safe FIFO queue. For LIFO queue use LifoQueue.

from queue import Queue
 <Queue> = Queue(maxsize=0)
 
@@ -1805,8 +1803,7 @@ no_of_params = len(<sig>.parameters) param_names = list(<sig>.parameters.keys())
-

#Metaprograming

Code that generates code.

Type

Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.

<class> = type(<class_name>, <parents_tuple>, <attributes_dict>)
-
+

#Metaprograming

Code that generates code.

Type

Type is the root class. If only passed an object it returns its type (class). Otherwise it creates a new class.

<class> = type(<class_name>, <parents_tuple>, <attributes_dict>)
diff --git a/parse.js b/parse.js index ac167d8..209c7b8 100755 --- a/parse.js +++ b/parse.js @@ -215,6 +215,10 @@ const LRU_CACHE = 'def fib(n):\n' + ' return n if n < 2 else fib(n-2) + fib(n-1)\n'; +const TYPE = + '<class> = type(<class_name>, <parents_tuple>, <attributes_dict>)'; + + function main() { const html = getMd(); initDom(html); @@ -314,6 +318,7 @@ function fixHighlights() { $(`code:contains(os.rename)`).html(OS_RENAME); $(`code:contains(ValueError: malformed node)`).html(EVAL); $(`code:contains(@lru_cache(maxsize=None))`).html(LRU_CACHE); + $(`code:contains(, , )`).html(TYPE); } function preventPageBreaks() {