From a3fe2c9b95b4abf657e078d9fa04fc5f339cce5c Mon Sep 17 00:00:00 2001 From: Dafydd Harries Date: Mon, 18 Mar 2013 04:02:06 -0400 Subject: use and/or instead of &/| --- license.py | 14 +++++++------- 1 file 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 , , ]> >>> print ls - X | Y | Z + X or Y or Z >>> list(ls) [, , ] >>> list(ls.flatten()) @@ -73,20 +73,20 @@ def parse_licenses(s): >>> ls , , ]> >>> print ls - X & Y & Z + X and Y and Z >>> list(ls) [, , ] >>> 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 = ( -- cgit v1.2.3