[Python-Dev] Path inherits from string

Thomas Wouters thomas at xs4all.net
Thu Jan 26 21:09:56 CET 2006


On Thu, Jan 26, 2006 at 07:55:08PM +0000, Steve Holden wrote:

> Would it help to redefine file/open so they called an __open__() method 
> on the argument were one defined, otherwise reverting to current behaviour?

Not really, open() is (by far!) not the only function that breaks. Most
posixmodule functions, by the looks of it, as well as a few in _tkinter and
socket. And that's just a quick grep for PyArg_Parse* with '"et' as an
argument. Perhaps if __open__ was generalized into __equivalent_string__...
but we've been there already. ;)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!


More information about the Python-Dev mailing list