Search notes:

Python: code (type)

>>> def f():pass
...
>>> type(f.__code__)
<class 'code'>

co_flags

>>> def f(): pass
...
>>> async def a(): pass
...
>>> def y(): yield 1
...
>>> print(f.__code__.co_flags)
67
>>> print(a.__code__.co_flags)
195
>>> print(y.__code__.co_flags)
99
See also dis.co_flags.

See also

Other Built-in types

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758203809, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/types/code(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78