Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
types.NoneType
#1
i can do:
from types import NoneType
in python2 but in python3 NoneType is no longer in the types module.  where did it go in python3?  also gone are NotImplementedType and EllipsisType  and a few others.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
In python2 types.py has NoneType = type(None).

In python3 that types.NoneType is gone it directly type(None). So you can

either use type(None).

or you can:
NoneType = type(None)
and use NoneType further.
Reply


Forum Jump:

User Panel Messages

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