Comment #8 on issue 32 by sroussey: Formatters (and predicates) should be passed a stack of namespaces, rather than a single one http://code.google.com/p/json-template/issues/detail?id=32
In Python, if you used named parameters, I think it can be more like JS and PHP. But that might be a Python 3.x thing. I can't remember where I read that.... If there is to be a break for the other languages, it could be with four parameters: formatter_function (data, context, formatter, argument_string) data -- the same thing as always context -- as you outline above formatter -- the string as the user wrote it (this would seem overly redundant unless you had several formatters mapped to the same formatter function) argument_string -- whatever text the user wrote that came after the previous formatter parameter (alternately, given the previous parameter is available, it could be the entire string the user wrote -- if the function cared about the stuff after, it could strip off the formatter name as given in the previous param). You could conceivably have the call type (one param or four params) to formatters and predicates be based on option, like meta characters are. In such a case, the user would have to specifically ask for feature that might then break their code, otherwise everything degrades to the current system. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JSON Template" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/json-template?hl=en -~----------~----~----~----~------~----~------~--~---
