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/2010-June/100865.html below:

[Python-Dev] bytes

[Python-Dev] bytes / unicode [Python-Dev] bytes / unicodeTerry Reedy tjreedy at udel.edu
Tue Jun 22 01:48:46 CEST 2010
On 6/21/2010 1:29 PM, P.J. Eby wrote:
> At 05:49 PM 6/21/2010 +0100, Michael Foord wrote:
>> Why is your proposed bstr wrapper not practical to implement outside
>> the core and use in your own libraries and frameworks?
>
> __contains__ doesn't have a converse operation, so you can't code a type
> that works around this (Python 3.1 shown):
>
>  >>> from os.path import join
>  >>> join(b'x','y')

>  >>> join('y',b'x')

I am really unclear what result you intend for such mixed pairs, for all 
possible mixed pairs, sensible or not. It would seem to me best to write 
your own pjoin function that did exactly what you want over the whole 
input domain.

-- 
Terry Jan Reedy

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