Re: [Python-Dev] Import and unicode: part two

2011-01-20 Thread Andy Teijelo
(Hi, I'm writing from an address different to the one I'm subscribed 
with to the list because I don't have reverse dns in my mail server and 
mail.python.org rejects my messages. I hope that's not much trouble)


Maybe Python should always use an ASCII encodable filename for modules: 
a translation of the module name into an ASCII encodable string that, 
preferrably, was the same as the module name if the module name didn't 
have any non-ASCII characters. Like, if the code said:


import cafe

Python would look for a file named:

cafe.py

but if the code said:

import café

then Python would look, in any platform, for a file named:

café.py  or  café.py  or something nicer.

Something along the lines of xmlcharrefreplace.
Just an idea.

Andy.

El 1/20/11 12:21 a.m., Glyph Lefkowitz escribió:


On Jan 20, 2011, at 12:19 AM, Glenn Linderman wrote:


Now if the stuff after m_ was the hex UTF-8 of "café", that could get
interesting :)


(As it happens, it's the hex digest of the MD5 of the UTF-8 of café... ;-))



___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/andy%40lists.teijelo.net

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Path PEP: some comments

2006-02-08 Thread Andy Teijelo Pérez
El Sábado, 4 de Febrero de 2006 2:35, Giovanni Bajo escribió:
> Hello,
>
> my comments on the Path PEP:
>
> - Many methods contain the word 'path' in them. I suppose this is to help
> transition from the old library to the new library. But in the context of a
> new Python user, I don't think that Path.abspath() is optimal. Path.abs()
> looks better. Maybe it's not so fundamental to have exactly the same names
> of the old library, especially when thinking of future? If I rearrange my
> code to use Path, I can as well rename methods to something more sound at
> the same time.
I haven't revised the whole class to look exactly which methods contain the 
word path and which do not. But, anyway this is just a simple comment. It's 
clear to me that Path.abspath() look redundant and Path.abs() tells clearly 
what the method does. But I think in most cases the method won't be used 
through the class, like 'Path.abs(instance)' but through an existing instance 
like 'home.abs()'. In this case, I think 'home.abspath()'  would be more 
readable than 'home.abs()'. Anyway, in the long term, I think people will 
just get used to what gets finally decided, so I could say I'm +0 about this. 
(Does one have to be a python developer or something to use the {+,-}{0,1} 
thing?, 'cause I'm not.)

Regards,
Andy.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com