banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #00086
[Merge] lp:~therp-nl/banking-addons/6.1-typo_in_postcode_handling into lp:~banking-addons-team/banking-addons/6.1-dev
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/6.1-typo_in_postcode_handling into lp:~banking-addons-team/banking-addons/6.1-dev with lp:~therp-nl/banking-addons/6.1-dev-useful_defaults as a prerequisite.
Requested reviews:
Banking Addons Team (banking-addons-team)
For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/6.1-typo_in_postcode_handling/+merge/104517
--
https://code.launchpad.net/~therp-nl/banking-addons/6.1-typo_in_postcode_handling/+merge/104517
Your team Banking Addons Team is requested to review the proposed merge of lp:~therp-nl/banking-addons/6.1-typo_in_postcode_handling into lp:~banking-addons-team/banking-addons/6.1-dev.
=== modified file 'account_banking/sepa/postalcode.py'
--- account_banking/sepa/postalcode.py 2010-07-16 14:44:59 +0000
+++ account_banking/sepa/postalcode.py 2012-05-03 10:32:23 +0000
@@ -46,9 +46,7 @@
'''
# Sort formats on length, longest first
formats = [(len(x), x) for x in format.split('|')]
- formats.sort()
- formats.reverse()
- formats = [x[1] for x in formats]
+ formats = [x[1] for x in sorted(formats, lambda x,y: -cmp(x,y))]
self.res = [re.compile(x.replace('#', '\\d').replace('@','[A-Z]'))
for x in formats
]