I mistakely onelinerized a piece of code, by using this Onelineizer and now am stuck trying to make it multiliner.
(lambda __after: [__after() for self.argv.domain in [(parsed_url.netloc)]][0] if parsed_url.netloc and not self.argv.domain else __after())(lambda: None)
self.argv is parser.parse_url()
from argparse and parsed_url is from urllib.parse import urlparse; parsed_url = urlparse(someurl)
. I think the code might been have written something like this:
if parsed_url.netloc and not self.argv.domain:
something
I cant deduce more, could someone help me make it readable again.
Also, __after()
is not a function defined by me, its added by that tool.
Onelinerizer uses a list comprehension to translate assignment statements:
is equivalent to:
so your entire line is equivalent to: