Issue 13599: Compiled regexes don't show all attributes in dir() (original) (raw)
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']