A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-September/028940.html below:

[Python-Dev] How to add an encoding alias?

[Python-Dev] How to add an encoding alias? [Python-Dev] How to add an encoding alias?Guido van Rossum guido@python.org
Thu, 26 Sep 2002 16:03:05 -0400
> Guido van Rossum wrote:
> >   import encodings.aliases
> >   encodings.aliases.aliases['ansi-x3-4-1968'] = 'ascii'
> 
> In order for the lookup to work, you have to replace hyphens
> with underscores; see the top of aliases.py.

Good catch!  Then my "fix" to aliases.py was also wrong.

Would it make sense to change the lookup function to convert *all*
punctuation to underscores before doing the lookup?  (Then this one
would actually have worked...)

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4