[Python-Dev] an alternative to embedding policy in PEP 418

Oleg Broytman phd at phdru.name
Fri Apr 6 15:40:03 CEST 2012


On Fri, Apr 06, 2012 at 11:57:20AM +0900, "Stephen J. Turnbull" <stephen at xemacs.org> wrote:
> What I want to know is why you're willing to assert that absence of a
> clock of a particular configuration is an Exception, when that absence
> clearly documented to be a common case?

   An error or not an error depends on how people will use the API. I
usually don't like error codes -- people tend to ignore them or check
lazily. If some library would do

    (get_clock(THIS) or get_clock(THAT)).clock()

I want to get a clearly defined and documented clock-related error, not
some vague "AttributeError: 'NoneType' object has no attribute 'clock'".

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-Dev mailing list