On Dec 16, 2007, at 3:26 PM, [EMAIL PROTECTED] wrote:

>
> and another issue around attribute.get_history...
> i have a descriptor that is autosetting some defaultvalue at first  
> get.

a descriptor on top of the InstrumentedAttribute itself ?  id wonder  
how you are configuring that.

> ScalarObjectAttributeImpl never knows that the attribute has been  
> missing at
> start - dict.get(key,NOVALUE) will never return NOVALUE, as
> the descriptor machinery is called instead of __dict__[key] / haskey  
> etc.

if you really want a "default on first get" value, and youre riding  
directly on top of the IA instead of using a differently-named  
attribute for your own descriptor like all the docs say to do, you  
should use the callable mechanisms built into the attributes package,  
although the new value created becomes the "committed" state so maybe  
thats not what you want.  im confused, someone issues "print  
object.foo", then it inserts some new data instead of not doing  
anything ?  what if nobody "gets" the attribute ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to