Pep8 for long pattern

Ganesh Pal ganesh1pal at gmail.com
Tue Mar 27 10:17:45 EDT 2018


Hello Python friends,

How do I split the below regex , so that it fits within the  character
limit of 79 words


pattern =  [
r'(?P<p_owner>([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))',

r'(?P<a_owner>(owner:\s+[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))',
                '.']

I am using Python 2.7 + Linux

Regards,
Ganesh



More information about the Python-list mailing list