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

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  -
> **   No cross posts or HTML encoding!  **
> (Related lists - 
> )

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to