Search notes:

Python: NoneType

Type of None is NoneType

>>> type(None)
<class 'NoneType'>

Comparison

None can be compared to a scalar:
x = 42
y = None

if x == y:
   print("they're the same")
else:
   print("they differ")

x = None
y = None

if x == y:
   print("they're the same")
else:
   print("they differ")
Github repository about-python, path: /types/NoneType/comparison.py

See also

Other Python 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...', 1758203932, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/types/NoneType/index(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78