Python Forum
where is NoneType defined?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where is NoneType defined?
#2
As far as I know, type(None) is the normal way to get it. It is a singleton type:
>>> t = type(None)
>>> t() is None
True
In CPython, it is defined in object.c in the source tree: see the lines PyTypeObject _PyNone_Type = ...
Reply


Messages In This Thread
where is NoneType defined? - by Skaperen - Jan-23-2021, 11:06 PM
RE: where is NoneType defined? - by Gribouillis - Jan-24-2021, 08:20 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020