Python Forum
Question about types and py2 to py3 diffrences
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about types and py2 to py3 diffrences
#6
If a zero-speed should be disallowed then that can be useful, but is None is semantically different from checking falsiness. The normal idiom for default values in function definition is to check for None, unless you have a good reason to use falsiness (e.g. in the difference between accepting any empty collection or not).
Reply


Messages In This Thread
RE: Question about types and py2 to py3 diffrences - by micseydel - Jun-22-2018, 08:16 PM

Forum Jump:

User Panel Messages

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