[Python-Dev] PEP 246, redux

Alex Martelli aleax at aleax.it
Thu Jan 13 18:35:52 CET 2005


On 2005 Jan 13, at 16:08, Phillip J. Eby wrote:

> this with their string/file/path discussions -- *nobody* is safe from 
> implicit adaptation if adaptation actually creates new objects with 
> independent state!  An adapter's state needs to be kept with the 
> original object, or not at all, and most of the time "not at all" is 
> the correct answer.

So, no way to wrap a str with a StringIO to adapt to 
"IReadableFile"...?  Ouch:-(  That was one of my favourite trivial use 
cases...

>> Anyway -- I'm pointing out that what to put in a rewrite of PEP 246 
>> as a result of all this is anything but obvious at this point, at 
>> least to me.
>
> LOL.  Me either!

...so let's hope Clark has clearer ideas, as it appears he does: as per 
a previous msg, I've asked him if he could be the one doing the next 
round of edits, instead of me...


Alex



More information about the Python-Dev mailing list