Changes between Initial Version and Version 1 of Ticket #21077, comment 1
- Timestamp:
- Sep 10, 2013, 2:58:14 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #21077, comment 1
initial v1 7 7 1. Only allow valid Python identifiers to be named arguments in `simple_tag` tags. If users want something else they'll have to forgo using `simple_tag`. This isn't backwards compatible, though, and is more restrictive than we might like. 8 8 9 2. Allow named arguments to be invalid Python identifiers, acknowledging that users can simply use `**kwargs` in their function signatures. In this case, I agree with semenov that we should be more permissive in what we accept; in particular, I don't see any reason to outlaw dashes. This is backwards compatible and more functional, though it seems hackish t o only allow the `**kwargs` style of function signature is these cases.9 2. Allow named arguments to be invalid Python identifiers, acknowledging that users can simply use `**kwargs` in their function signatures. In this case, I agree with semenov that we should be more permissive in what we accept; in particular, I don't see any reason to outlaw dashes. This is backwards compatible and more functional, though it seems hackish that only the `**kwargs` style of function signature can be used with named arguments that aren't Python identifiers. 10 10 11 11 It looks like this same regular expression is used for other tags with keyword arguments (`with`, `include`, `blocktrans`, `url`) so it's probably worth thinking about any implications for those cases as well.