amitu / importd

django based mini framework inspired from sinatra. fully compatible with django.
http://amitu.com/importd/
BSD 3-Clause "New" or "Revised" License
511 stars 30 forks source link

lazy operators #75

Open amitu opened 9 years ago

amitu commented 9 years ago

I want to be able to do:

from importd import d, debug

d(
    SOMETHING_ELSE="foo" + debug("one", prod="two")
)

As of now this leads to an exception. importd.DValue can implement ADD/MUL/SUB/NOT etc operator, and do it lazily.

ghost commented 9 years ago

Can it just be a ternary operator :grey_question:

"one" if debug else "two"