In interactive debugger:

 >>> hasattr(c,'name')
True
 >>> hasattr(c,'nafssadffa')
True

Huh? Why does hasattr return True for attributes that clearly don't 
exist in c?

On related note, how to check for existence of attributes in c in 
templates? I want to do smth like:

%if c.hasattr('name'):
  c.name has no attribute 'name'
%else:
  c.name has attribute ${c.name}
%endif

Regards,
mk


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

Reply via email to