Message51084
Logged In: YES
user_id=21627
First: Do you want to continue to work on this, or do you
consider this just "demonstration code" (i.e. not
contributed for inclusion in Python), hoping that somebody
else implements this feature?
I think the behavior of __file__ must be more consistent
across platforms, and the selected behaviour must be
documented somewhere. Several definitions of "consistent
behavior" come to mind:
1. __file__ is always a Unicode string
2. __file__ is a byte string if its ASCII, else Unicode
3. __file__ is a byte string if its in the system encoding,
else Unicode
4. __file__ is a byte string if its in the file system
encoding, else Unicode.
The documentation needs to be updated in several places,
e.g. also for inspect.getfile.
I would expect that pydoc would also need to be updated.
Selecting from the options above: I believe 4 is most
compatible with previous versions; 1 and 2 are most
convenient to work with in applications like pydoc which
have to generate HTML (1 is easier to work with, 2 is more
compatible with previous versions).
|
|
Date |
User |
Action |
Args |
2007-08-23 15:54:33 | admin | link | issue1552880 messages |
2007-08-23 15:54:33 | admin | create | |
|