[Debian-hebrew-package] Bug#583092: none / None and python
Ron Varburg
linux-il at hotmail.com
Tue May 25 15:18:54 UTC 2010
I was asked, in a private mail, to explain
why does None/none makes any difference.
I believe it is a good thing to keep conversation about the report
in the archive:
None is predefined, and interpreted to False.
while none is like any other object.
I can modify a little the code snippet I included and get:
$ cat
bugDemonstration
#! /usr/bin/python
import hdate
h =
hdate.Hdate()
h.set_gdate(1, 1, 2010)
julian = h.get_julian()
holyday
= h.get_holyday_string(1)
if not holyday:
print "When
get_holyday_string claims there is no holyday, one get:", holyday
parasha
= h.get_parasha_string(julian)
if parasha:
print "When
get_paraha_string claims there is no parasha, one get:", parasha
a = None
print a
if a:
print a
b = none
print b
if b:
print b
$ ./bugDemonstration
When get_holyday_string claims there is
no holyday, one get: None
When get_paraha_string claims there is no
parasha, one get: none
None
Traceback (most recent call last):
File "./bugDemonstration", line 20, in <module>
b = none
NameError: name 'none' is not defined
_________________________________________________________________
Hotmail: דואר אלקטרוני מהימן עם הגנה רבת עוצמה של Microsoft מפני הודעות זבל.
https://signup.live.com/signup.aspx?id=60969
More information about the Debian-hebrew-package
mailing list