aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDafydd Harries <daf@rhydd.org>2013-03-18 04:02:06 -0400
committerDafydd Harries <daf@rhydd.org>2013-03-18 04:02:06 -0400
commita3fe2c9b95b4abf657e078d9fa04fc5f339cce5c (patch)
treea4402c2c7e9646250e00e1e64e5ac9f80e18c14e
parent3fb386c2a3209a895e2922a458ee7864356b2cc6 (diff)
use and/or instead of &/|
-rw-r--r--license.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/license.py b/license.py
index e52d3f6..e33f06e 100644
--- a/license.py
+++ b/license.py
@@ -42,10 +42,10 @@ class Licenses(object):
return '<%s %r>' % (self.__class__.__name__, self.xs)
class AllLicenses(Licenses):
- _join = '&'
+ _join = 'and'
class AnyLicense(Licenses):
- _join = '|'
+ _join = 'or'
def parse_licenses(s):
"""
@@ -63,7 +63,7 @@ def parse_licenses(s):
>>> ls
<AnyLicense [<License X>, <License Y>, <License Z>]>
>>> print ls
- X | Y | Z
+ X or Y or Z
>>> list(ls)
[<License X>, <License Y>, <License Z>]
>>> list(ls.flatten())
@@ -73,20 +73,20 @@ def parse_licenses(s):
>>> ls
<AllLicenses [<License X>, <License Y>, <License Z>]>
>>> print ls
- X & Y & Z
+ X and Y and Z
>>> list(ls)
[<License X>, <License Y>, <License Z>]
>>> list(ls.flatten())
['X', 'Y', 'Z']
>>> print parse_licenses("X or Y and Z")
- X | (Y & Z)
+ X or (Y and Z)
>>> print parse_licenses("X and Y or Z")
- (X & Y) | Z
+ (X and Y) or Z
>>> print parse_licenses("X, and Y or Z")
- X & (Y | Z)
+ X and (Y or Z)
"""
splits = (