On Thu, Jan 16, 2014 at 11:43 AM, Steven D'Aprano
wrote:
> Worse, linguists sometimes disagree as to what counts as a grapheme. For
> instance, some authorities consider the English "sh" to be a separate
> grapheme. As a native English speaker, I'm not sure about that. Certainly
> it isn't a separ
On Jan 15, 2014, at 4:50 AM, Robin Becker wrote:
> On 15/01/2014 12:13, Ned Batchelder wrote:
>
>>> On my utf8 based system
>>>
>>>
robin@everest ~:
$ cat ooo.py
if __name__=='__main__':
import sys
s='A̅B'
print('version_info=%s\nlen(%s)=%d' % (s
On 15/01/2014 12:13, Ned Batchelder wrote:
On my utf8 based system
robin@everest ~:
$ cat ooo.py
if __name__=='__main__':
import sys
s='A̅B'
print('version_info=%s\nlen(%s)=%d' % (sys.version_info,s,len(s)))
robin@everest ~:
$ python ooo.py
version_info=sys.version_info(ma
On 1/15/14 7:00 AM, Robin Becker wrote:
On 12/01/2014 07:50, wxjmfa...@gmail.com wrote:
sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
jmf
On my utf8 based system
robin@everest ~:
$ cat ooo.py
if __name
On 12/01/2014 07:50, wxjmfa...@gmail.com wrote:
sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
jmf
On my utf8 based system
robin@everest ~:
$ cat ooo.py
if __name__=='__main__':
import sys
s='A̅B
On 1/13/2014 4:54 AM, wxjmfa...@gmail.com wrote:
I'm afraid I'm understanding Python (on this
aspect very well).
Really?
Do you belong to this group of people who are naively
writing wrong Python code (usually not properly working)
during more than a decade?
To me, the important question i
Am 13.01.2014 10:54 schrieb wxjmfa...@gmail.com:
Not at all. I'm afraid I'm understanding Python (on this
aspect very well).
IBTD.
Do you belong to this group of people who are naively
writing wrong Python code (usually not properly working)
during more than a decade?
Why should I be?
'ß
On 13/01/2014 16:24, wxjmfa...@gmail.com wrote:
You are right. It's on Windows. It is only showing how
Python can be a holy mess.
Regarding unicode Python 2 was a holy mess, fixed in Python 3.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our la
Le lundi 13 janvier 2014 11:57:28 UTC+1, Chris Angelico a écrit :
> On Mon, Jan 13, 2014 at 9:38 PM, Steven D'Aprano
>
> wrote:
>
> > I think you are using "from __future__ import unicode_literals".
>
> > Otherwise, that cannot happen in Python 2.x.
>
> >
>
>
>
> Alas, not true.
>
>
>
>
On 01/13/2014 02:54 AM, wxjmfa...@gmail.com wrote:
> Not at all. I'm afraid I'm understanding Python (on this
> aspect very well).
Are you sure about that? Seems to me you're still confused as to the
difference between unicode and encodings.
>
> Do you belong to this group of people who are nai
On Mon, Jan 13, 2014 at 9:38 PM, Steven D'Aprano
wrote:
> I think you are using "from __future__ import unicode_literals".
> Otherwise, that cannot happen in Python 2.x.
>
Alas, not true.
>>> sys.version
'2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]'
>>> sys.maxunicode
6553
On Mon, 13 Jan 2014 01:54:21 -0800, wxjmfauth wrote:
sys.version
> '2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]'
assert 'Straße'[4] == 'ß'
assert u'Straße'[4] == u'ß'
I think you are using "from __future__ import unicode_literals".
Otherwise, that cannot hap
On Mon, Jan 13, 2014 at 8:54 PM, wrote:
> This assertions are correct (byte string and unicode).
>
sys.version
> '2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]'
assert 'Straße'[4] == 'ß'
assert u'Straße'[4] == u'ß'
>
> jmf
>
> PS Nothing to do with Py2/Py3
Le lundi 13 janvier 2014 09:27:46 UTC+1, Thomas Rachel a écrit :
> Am 12.01.2014 08:50 schrieb wxjmfa...@gmail.com:
>
> sys.version
>
> > 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>
> s = 'Stra�e'
>
> assert len(s) == 6
>
> assert s[5] == 'e'
>
>
Am 12.01.2014 08:50 schrieb wxjmfa...@gmail.com:
sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
Wow. You just found one of the major differences between Python 2 and 3.
Your assertins are just wrong, as s = '
On 2014-01-12 08:31, Peter Otten wrote:
wxjmfa...@gmail.com wrote:
sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
jmf
Signifying nothing. (Macbeth)
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.
On 12/01/2014 09:00, Stefan Behnel wrote:
Peter Otten, 12.01.2014 09:31:
wxjmfa...@gmail.com wrote:
sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
jmf
Signifying nothing. (Macbeth)
Python 2.7.2+ (default
On 1/12/14 2:50 AM, wxjmfa...@gmail.com wrote:
sys.version
2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
jmf
Dumping random snippets of Python sessions here is useless. If you are
trying to make a point, you have to
Peter Otten, 12.01.2014 09:31:
> wxjmfa...@gmail.com wrote:
>
>> >>> sys.version
>> 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>> >>> s = 'Straße'
>> >>> assert len(s) == 6
>> >>> assert s[5] == 'e'
>> >>>
>>
>> jmf
>
> Signifying nothing. (Macbeth)
>
> Python 2.7.2+ (def
wxjmfa...@gmail.com wrote:
sys.version
> 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
s = 'Straße'
assert len(s) == 6
assert s[5] == 'e'
>
> jmf
Signifying nothing. (Macbeth)
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Ty
20 matches
Mail list logo