Mercurial > hg > pyloader
comparison pyloader/cast.py @ 71:2261cf505daf
interpolate "inline" wrapper arguments
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 09 Jun 2011 18:03:16 -0700 |
parents | 886009132409 |
children | efb7a8a189e8 |
comparison
equal
deleted
inserted
replaced
70:7ec0ca0134ff | 71:2261cf505daf |
---|---|
27 | 27 |
28 def str2list(string, separator=None): | 28 def str2list(string, separator=None): |
29 string = string.rstrip(separator) | 29 string = string.rstrip(separator) |
30 return [i.strip() for i in string.split(separator)] | 30 return [i.strip() for i in string.split(separator)] |
31 | 31 |
32 def str2args(string, separator=None): | 32 def str2args(string, separator=','): |
33 args = str2list(string, separator) | 33 args = str2list(string, separator) |
34 _args = [] | 34 _args = [] |
35 kw = {} | 35 kw = {} |
36 for arg in args: | 36 for arg in args: |
37 if '=' in arg: | 37 if '=' in arg: |