New submission from Martin Häcker <[email protected]>:
When looking at a regex with dir() you don't get all available attributes -
which is inconvenient as some very important ones (like .pattern) are not
visible.
To demonstrate:
> import re
> re.compile('foo').pattern
'foo'
> dir(re.compile('foo'))
['__copy__',
'__deepcopy__',
'findall',
'finditer',
'match',
'scanner',
'search',
'split',
'sub',
'subn']
----------
components: Regular Expressions
messages: 149428
nosy: dwt, ezio.melotti
priority: normal
severity: normal
status: open
title: Compiled regexes don't show all attributes in dir()
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13599>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com