[Python-Dev] just say no...
Jack Jansen
jack@oratrix.nl
Fri, 12 Nov 1999 17:33:46 +0100
The problem with "s" and "s#" is that they're already semantically
overloaded, and will become more so with support for multiple charsets.
Some modules use "s#" when they mean "give me a pointer to an area of memory
and its length". Writing to binary files is an example of this.
Some modules use it to mean "give me a pointer to a string". Writing to a text
file is (probably) an example of this.
Some modules use it to mean "give me a pointer to an 8-bit ASCII string". This
is the case if we're going to actually look at the contents (think of
string.upper() and such).
I think that the only real solution is to define what "s" means, come up with
new getarg-formats for the other two use cases and convert all modules to use
the new standard. It'll still cause grief to extension modules that aren't
part of the core, but at least the problem will go away after a while.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm