I don't have a very good answer for you but it does appear that each of the
respective methods is explicitly documented to behave in the way that it
behaves. Since that's defined behavior you can likely depend on that and
add a trailing / to the output of p.traversal.resource_path(..).

On Sat, Feb 20, 2016 at 3:04 AM, Gerhard Schmidt <[email protected]> wrote:

> HI,
>
> I'm building a application with traversal (ZODB). I'm encountering the
> problem that the return value of pyramid.traversal.resource_path(obj)
> returns a different value than request.resource_path for the same object.
>
> The returned string differs only in a trailing /, which causes no
> problem when used as URL but if you use the resource_path to determine
> if two objects are the same object this matters.
>
> request.resource_path returns the trailing / which
> pyramid.traversal.resource_path doesn't.
>
> Is this on purpose or a bug?
>
> Regards
>  Estartu
>
> --
> ---------------------------------------------------------------------------
> Gerhard Schmidt    | http://www.augusta.de/~estartu     |
> Fischbachweg 3     |                                    | PGP Public Key
> 86856 Hiltenfingen | JabberID: [email protected]       | on request
> Germany            |                                    |
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to