[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: PEP 354: Enumerations in Python
From: Tim Chase <python.list () tim ! thechases ! com>
Date: 2006-03-01 6:19:18
Message-ID: 44053CE6.5040909 () tim ! thechases ! com
[Download RAW message or body]
>> Do you anticipate having parameters like socket.AF_INET
>> that are currently integers, become enumeration members
>> in future releases?
>
> Since these are derived from values defined as integers
> in C, it's probably better to leave them that way. There
> may be code that relies on them being integers or having
> those integer values.
I'd say that "because something is done in C, it's the best
way to do it in Python" is a bad line of reasoning :) If I
wanted C, I'd use C. ("some C API functions take pointers
to arbitrary blocks of memory...python should [natively]
implement pointers to arbitrary blocks of memory..." kinda
scares me to be frank...that's why there's the ability to
write clean wrappers in C or C++ to expose such things)
The backwards-compatibility-with-existing-code is a much
better reason :)
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic