Narendra Madurkar added the comment:
True is a boolean so ~True should return False according to me.
True is not the same as 1
--
___
Python tracker
<https://bugs.python.org/issue45
New submission from Narendra Madurkar :
~(True) returns -2
~(False) returns -1
--
messages: 403190
nosy: nmadurkar
priority: normal
severity: normal
status: open
title: ~(True) and ~(False) gives incorrect result
___
Python tracker
<ht
Narendra L added the comment:
If you see output dttrace e is missing
see working example
>>> test = "Cookie: test-Debug=edttrace=expires=1517828996"
>>> test.lstrip('Cookie: test-Debug=')
'dttrace=expires=1517828996'
# e missing here
New submission from Narendra L :
Lstrip not working as expected when the string has "=e" in it.
Python 2.7.11 (default, Jan 22 2016, 08:28:37)
>>> test = "Cookie: test-Debug=edttrace=expires=1517828996"
>>> test.lstrip('Cookie:
Narendra added the comment:
Hi Storchaka,
As per re.groups(), its should work as below:
groups([default])
Return a tuple containing all the subgroups of the match, from 1 up to however
many groups are in the pattern. The default argument is used for groups that
did not participate in the
Narendra added the comment:
Please look in to the following example:
>>> m.groups()
('narendra', 'happiestmidns', 'com')
>>> m.groups(1)
('narendra', 'happiestmidns', '
New submission from Narendra :
Hi Team,
I have observed a bug in re.groups() function behavior in Python as below:
Issue:
re.groups() is not validating the arguments
Example:
>>> m = re.match(r'(\w+)@(\w+)\.(\w+)','usern...@hackerrank.com')
>>> m.gr