purcell / airspeed

A lightweight Python template engine compatible with Velocity, used in OpenStack
Other
91 stars 37 forks source link

Add 'strict' mode #40

Open tuukkamustonen opened 4 years ago

tuukkamustonen commented 4 years ago

Sketched something for https://github.com/purcell/airspeed/issues/39.

What do you think? Do you see fundamental problems here?

purcell commented 4 years ago

Thanks! Thinking about this, I guess another way to do it might be to support a well-known object in the namespace, e.g. airspeed_options, or just an airspeed_strict var. Then a user can pass that in as part of the namespace handed to merge. This would be a simpler implementation, and I don't see any particular downside.

tuukkamustonen commented 4 years ago

Yeah, that would work, too. It would kinda feel dirty to pollute user's namespace, but I guess there's no harm so why not. I can change it.

Any other changes you'd like to see here?