[Zope3-Users] getId in zope3?

2006-11-05 Thread Peter Bengtsson
In Zope2 every object has an 'id' which meant that you can use 
someobject.getId() to find out what name the object is stored under in 
its container.

Is there an equivalent in zope3?
...or am I looking for a solution to a problem that doesn't exist?
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] getId in zope3?

2006-11-05 Thread Jim Washington
Peter Bengtsson wrote:
 In Zope2 every object has an 'id' which meant that you can use
 someobject.getId() to find out what name the object is stored under in
 its container.
 Is there an equivalent in zope3?
 ...or am I looking for a solution to a problem that doesn't exist?
Hi, Peter

Have a look at

zope.traversing.api

If you have an older source tree, look for

zope.app.traversing.api

which is deprecated, but OK to use until 3.5.

-Jim Washington
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] getId in zope3?

2006-11-05 Thread Gary Poster


On Nov 5, 2006, at 1:12 PM, Peter Bengtsson wrote:

In Zope2 every object has an 'id' which meant that you can use  
someobject.getId() to find out what name the object is stored under  
in its container.

Is there an equivalent in zope3?


__name__
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] getId in zope3?

2006-11-05 Thread Stephan Richter
On Sunday 05 November 2006 13:58, Gary Poster wrote:
 On Nov 5, 2006, at 1:12 PM, Peter Bengtsson wrote:
  In Zope2 every object has an 'id' which meant that you can use  
  someobject.getId() to find out what name the object is stored under  
  in its container.
  Is there an equivalent in zope3?

 __name__

This is officially an implementation detail; zope.traversing.api.getName() is 
the API call.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] getId in zope3?

2006-11-05 Thread Fred Drake

On 11/5/06, Stephan Richter [EMAIL PROTECTED] wrote:

This is officially an implementation detail; zope.traversing.api.getName() is
the API call.


Interesting; I'd never known it was anything other than __name__.
These APIs just keep changing...

(Er, this indicates a serious documentation problem, I think.
Documentation embedded all over the source tree is far better than
nothing, and good for maintainers, but still totally stinks for end
users.  And, well, for maintainers too, if you need to understand the
public interface.)


 -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Every sin is the result of a collaboration. --Lucius Annaeus Seneca
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] getId in zope3?

2006-11-05 Thread Jim Fulton

Fred Drake wrote:

On 11/5/06, Stephan Richter [EMAIL PROTECTED] wrote:
This is officially an implementation detail; 
zope.traversing.api.getName() is

the API call.


Interesting; I'd never known it was anything other than __name__.
These APIs just keep changing...


No, the APIs haven't changed.  It's really a question of best practice
and that evolves over time.  We created a formal API, getName,
because we were queasy about exposing __name__.  In practice, there
is no other implementation and using __name__ is cleaner in a lot of
ways, IMO.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users