The DWIM of not disallowing traversal of underscore names is useful
(because it makes it easy to conventionally mark attrs as private) but
it can definitely be a drag if you really do want to publish something
that begins with an underscore; this happens a lot when you need to deal
with allowing uploads of arbitrary filenames.

It might be useful to add something like you propose, except I might
take exception to the name "isTraversable" (everything is traversable,
really); maybe just set a magic attr on the object like
__allow_underscore_traversal__.

However, adding such a feature would need to be done carefully.  Much
usage of the Zope security machinery utterly depends on not being able
to traverse underscore names.

- C

On Thu, 2005-06-02 at 15:59 -0400, Dan Pozmanter wrote:
> Wouldn't it be cool if instead of checking explicitly for a leading
> '_' during traversal,
> you ran a method "isTraversable" (On SimpleItem for instance), which
> by default
> just checks for a leading '_', but could be overridden in a particular
> class?
>  
> Dan
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to