Ludovico Gardenghi <[EMAIL PROTECTED]> added the comment: > You are not completely wrong. It's just that this detail is something > most people recognize at some point and accept as a fact, regardless > of what the language specification says (and, as I claim, that text > isn't incorrect - or the implementation isn't incorrect -- it's just > underspecified, failing to mention a detail specific to CPython)
Ok. I think I'll end up accepting it as a fact, too :) and work around the issue. IMHO it would be perfectly acceptable to say "if you use CPython and extend python with some C functions you must expect this behavior", but it's slightly less acceptable that different modules from the standard library have different behaviors (depending on which language has been used to implement them): - open(mode='r', name='filename') works - os.open(flag=os.O_RDONLY, filename='filename') does not work - calendar.weekday(2008, day=24, month=4) works - math.fmod(x=10, y=3) does not work - ... >From the point of view of someone who writes python code there should be no difference between the behavior of these calls, as long as they are included in the standard python library. IMHO, again. Maybe yes, the easier but probably harmless solution is to change the documentation and point out that "in general, you can't". Maybe this somehow leans towards promoting a bug to the rank of feature? ;-) __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2677> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com