[python] Pulnocni rozjimani :-)

mtip mtip na atlas.cz
Úterý Květen 12 08:43:41 CEST 2015


Trochu odjinud:

>>> bool(re.search(ur'[a-ž]', u'Ě', re.IGNORECASE|re.UNICODE))
True
>>> bool(re.search(ur'[a-ž]', u'Ě', re.IGNORECASE))
True
>>> bool(re.search(ur'[a-ž]', 'Ě', re.IGNORECASE))
True
>>> bool(re.search(r'[a-ž]', 'Ě', re.IGNORECASE))
True
>>> bool(re.search(r'[a-ž]', u'Ě', re.IGNORECASE))
False
>>> bool(re.search(r'[a-ž]', u'Ě', re.IGNORECASE|re.UNICODE))
False

Mirek

>> Dne 10.5.2015 v 01:05 Vladimir Macek napsal(a):
>> Just having fun.
>>
>>      $ python
>>      >>> a = {}
>>      >>> b = {'a': a}
>>      >>> a['b'] = b
>>      >>> a
>>      {'b': {'a': {...}}}
>>      >>> b
>>      {'a': {'b': {...}}}
>>      >>> import cPickle
>>      >>> ap = cPickle.dumps(a)
>>      >>> del a, b
>>      >>> len(ap)
>>      26
>>      >>> a = cPickle.loads(ap)
>>      >>> a
>>      {'b': {'a': {...}}}
>>      >>> a['b']
>>      {'a': {'b': {...}}}
>>      >>> a['b']['a']
>>      {'b': {'a': {...}}}
>>      >>> a['b']['a']['b']
>>      {'a': {'b': {...}}}
>>      >>>
>>
>> Navaze nekdo? :-)
>>
>> V.
>>
>>
>> --- news://freenews.netfront.net/ - complaints: news na netfront.net ---
>>

B> _______________________________________________
B> Python mailing list
B> python na py.cz
B> http://www.py.cz/mailman/listinfo/python

B> Visit: http://www.py.cz



Další informace o konferenci Python