String concatination fails on first use
Closed this issue · 0 comments
con-f-use commented
String concatination with a lazy object fails (e.g. STASH_USER + "test"
in the example below). The exception being thrown is: TypeError: unsopported operand type(s) for +: 'LazyObject' and 'str'
. See picture:
Here, STASH_USER
is something like
from lazyasd import lazyobject
@lazyobject
def STASH_USER(): return some_expensive_function_that_returns_a_string()
I think lazyasd needs to implement an __add__
and __concat__
@gforsyth, @scopatz .