[Debian-hebrew-package] Bug#583092: Bug#583092: should return None instead of none
Ron Varburg
linux-il at hotmail.com
Tue May 25 21:43:03 UTC 2010
I believe that the same logic that enables:
holyday = h.get_holyday_string(1)
if holyday:
print holyday
Should be applicable to the output of the h.get_parasha_string()
function. Why
parasha = h.get_paraha_string(1)
if parasha:
print parasha
prints none, while a similar construct for holyday is smart and knows
to auto magically skip days which are not holyday? I consider
the current implementation a non unified, and a surprising, API.
In my opinion, this is a bug, and it is not a feature.
I haven't looked at the C code - libhdate1. When there is no holiday,
get_holyday_string returns None. I don't see the difference that makes
get_parasha_string returns none rather then None. Since I haven't
looked at libhdate1, what circumstances makes you map to the parasha
number 0 and what makes you map to a non 0 parasha are not cleared
to me.
While I am at it, Do you agree that the Python code lacks documentation?
I think you should start with documentation strings.
_________________________________________________________________
Hotmail: דואר אלקטרוני מהימן עם הגנה רבת עוצמה מפני הודעות זבל.
https://signup.live.com/signup.aspx?id=60969
More information about the Debian-hebrew-package
mailing list