Message7328
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. |
|
Date |
User |
Action |
Args |
2012-07-17 20:11:42 | amak | set | messageid: <1342555902.46.0.863975595751.issue1928@psf.upfronthosting.co.za> |
2012-07-17 20:11:42 | amak | set | recipients:
+ amak, fwierzbicki, alekstorm |
2012-07-17 20:11:42 | amak | link | issue1928 messages |
2012-07-17 20:11:42 | amak | create | |
|