My Python annoyances
Ben Collver
collver at peak.org
Fri May 4 11:07:41 EDT 2007
Alex Martelli wrote:
> "Type-switching" in this way is a rather dubious practice in any
> language (it can't respect the "open-closed" principle). Can't you have
> those objects wrapped in suitable wrappers with a "copyorwrite" method
> that knows what to do? For example, StringIO.StringIO is a standard
> library wrapper type that makes a string look like a file.
That is very reasonable. Thanks again,
Ben
More information about the Python-list
mailing list