Message7328

Author amak
Recipients alekstorm, amak, fwierzbicki
Date 2012-07-17.20:11:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342555902.46.0.863975595751.issue1928@psf.upfronthosting.co.za>
In-reply-to
Content
Practically speaking, there is no difference between unicode strings and strings on jython, both are implemented using java strings.

In terms of python code, there should no difference either.

For example, a test for 'stringness' should always be conducted with isinstance(ip_address, basestring), not (isinstance(ip_address, str).

The only area where it might conceivably make a diference is when converting to bytes, as in inet_aton and inet_pton. But when passing unicode ip addresses to these functions, the correct byte array is returned: there are specific unit tests for this.

Lastly, the distinction between 'str' and 'unicode' is really a legacy of cpython, one which was done away in python 3, which has only 'bytes' and 'unicode'.

So I think it best to leave things as is.

But I am open to dissenting opinions.

I am also adding Frank to see if wants to cast his BDFL casting vote.
History
Date User Action Args
2012-07-17 20:11:42amaksetmessageid: <1342555902.46.0.863975595751.issue1928@psf.upfronthosting.co.za>
2012-07-17 20:11:42amaksetrecipients: + amak, fwierzbicki, alekstorm
2012-07-17 20:11:42amaklinkissue1928 messages
2012-07-17 20:11:42amakcreate