David Bremner <[email protected]> writes:
> def parse_source(string):
>     matches=rex.match(string)
>     if matches:
>         return (matches.group(1),matches.group(2))
>     else:
>         return string

Probably return type polymorphism is a terrible idea in python. But I
guess you knew that. Maybe return (string,None) is the simplest
option. Or nicer, find the correct version from the binary package,
which I think is closer to your original idea.

-- 
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint

Reply via email to