defunkt / pystache

Mustache in Python
http://mustache.github.com/
MIT License
1.31k stars 308 forks source link

Escape dots in key parts #148

Closed waxcorp closed 11 years ago

waxcorp commented 11 years ago

Hi there,

We're enjoying Pystache at Foursquare and ran into a case where it would be useful to reference key parts containing periods. I came across an accepted pull request in Mustache.js here https://github.com/bitovi/canjs/commit/ffa9afb7b917cc304bb8f52fc850ff26b3c58607 and decided to give it a try for Pystache. Please let us know if you see any significant issues with this change. Looking forward to hearing your thoughts and thanks for your hard work on Pystache!

Best, Josh

cjerdonek commented 11 years ago

Thanks for the kind words and for writing up a patch with tests. What's the use case out of curiosity and are there work-arounds? I wonder about the extra complexity this adds and the other edge cases it introduces though. For example, what about parts that end in a trailing slash? Would that no longer be supported? It seems like a more complete escaping mechanism would be needed.

cjerdonek commented 11 years ago

It's been three weeks and no reply back. I'm closing this issue for a number of reasons: the feature doesn't seem necessary (for example, why is not a problem that method names can't contain a period), it's not backwards compatible, the feature is underspecified (what about parts that end in a trailing slash), it would add complexity both to the implementation and the description of behavior, and it departs from the Mustache spec we chose to follow.