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/2010-November/106021.html below:

[Python-Dev] Removal of Win32 ANSI API

[Python-Dev] Removal of Win32 ANSI API [Python-Dev] Removal of Win32 ANSI APIHirokazu Yamamoto ocean-city at m2.ccsnet.ne.jp
Fri Nov 26 17:33:50 CET 2010
On 2010/11/14 9:06, Victor Stinner wrote:
> Yes, but how do you check if the input argument is a bytes or a str object
> with your PyArg_Parse converter? You should use "O" format and manually
> convert it to unicode, and then convert the result back to bytes (if the input
> was bytes). It don't think that it makes the code shorter.
>
> The code is currently working. The question is if we have to drop the ANSI API
> now, later or never. It looks like the decision moves to "later" (deprecate in
> 3.2, remove in 3.3). I still think that drop now doesn't really hurt.
>
> Victor

Humble thoughts...
Is it possible a conversion from bytes (ANSI) to unicode fails on
windows? If not, is it allowed to convert to unicode with
PyUnicode_FSDecoder if function doesn't return str? For example, 
os.stat() takes str as arguments but doesn't return str.

# I noticed win_readlink() in Modules/posixmodule.c already unicode
# only. Maybe not so much problem? ;-)
More information about the Python-Dev mailing list

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