Search notes:

Python standard library: typing.NamedTuple

from typing import NamedTuple

class Information(NamedTuple):
    id:        int | None
    name:      str | None
    year_pub:
    lang:      str | None

info = Information(id = 42, name = 'Hello World', year_pub = 2020, lang = 'en')

print(info.name)

See also

collections.namedtuple
dataclasses.dataclass
typing

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:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/developm...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1788526889, '216.73.217.21', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/standard-library/typing/NamedTuple(51): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51