A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-September/009251.html below:

[Python-Dev] hasattr() and Unicode strings

[Python-Dev] hasattr() and Unicode strings [Python-Dev] hasattr() and Unicode stringsM.-A. Lemburg mal@lemburg.com
Fri, 08 Sep 2000 14:02:46 +0200
"Fred L. Drake, Jr." wrote:
> 
> Andrew Kuchling writes:
>  > Is this a bug or a feature?  I'd say bug; the Unicode should be
>  > coerced using the default ASCII encoding, and an exception raised if
>  > that isn't possible.
> 
>   I agree.
>   Marc-Andre, what do you think?

Sounds ok to me.

The only question is where to apply the patch:
1. in hasattr()
2. in PyObject_GetAttr()

I'd opt for using the second solution (it should allow string
and Unicode objects as attribute name). hasattr() would then
have to be changed to use the "O" parser marker.

What do you think ?

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



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