diff options
author | Dafydd Harries <daf@rhydd.org> | 2013-03-19 13:03:57 -0400 |
---|---|---|
committer | Dafydd Harries <daf@rhydd.org> | 2013-03-19 13:03:57 -0400 |
commit | bc15837160021acd04d9c253567e0163761640dc (patch) | |
tree | a35c47f84098c3f09d81126df7260aaf2d0cdd0f | |
parent | c7dbac1d360aa3a9d57960dbb1a70dc3676197b3 (diff) |
parse | in license descriptions
-rw-r--r-- | license.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -87,11 +87,15 @@ def parse_licenses(s): >>> print parse_licenses("X, and Y or Z") X and (Y or Z) + + >>> print parse_licenses("X | Y") + X or Y """ splits = ( (', and ', AllLicenses), (' or ', AnyLicense), + (' | ', AnyLicense), (' and ', AllLicenses)) for (split_str, cls) in splits: |