[Python-3000] PEP 3108: Standard Library Reorganization

Josiah Carlson jcarlson at uci.edu
Wed Jan 3 21:48:47 CET 2007


Barry Warsaw <barry at python.org> wrote:
> On Jan 3, 2007, at 1:44 PM, Josiah Carlson wrote:
>> > What about:
> >
> > 'hello world'.encode.base64()
> >
> > Then incorrectly named encodings can raise an attribute error. Users
> > can discover what they can encode/decode their objects to via dir 
> > (obj.encode),
> > etc.
>> That's better. I'm not sure it's a total win over what we have now, 
> unless you're thinking that the mapping between .encode.<whatever> 
> and .encode('whatever') is automatic.

I'm thinking that .encode('whatever') would disappear (maybe be
deprecated for 2.x if it was seen as a solution to long-standing issues),
to be replaced by .encode.whatever().
 - Josiah


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /