It seems default() and lookup() have been renamed to _default()
and _lookup().
Why has this been changed? Is there any good reason for that?
Why was this change not been discussed or disclosed on the mailing list?
And why have the docs not been updated?
* the docs still talk about default() nearly everywhere:
http://turbogears.org/2.1/docs/main/Controllers.html
http://turbogears.org/2.1/docs/main/explorequickstart.html
http://turbogears.org/2.1/docs/main/TGControllers.html
(in the second section it's _default() suddenly),
also the wiki20 tutorial in the text and code snippets
* some tests still use default() and lookup()
* even the TGController still has default() and lookup()
in its docstring
This really needs to be fixed before the TG 2.1 release.
-- Christoph
-Rick
> --
> You received this message because you are subscribed to the Google
> Groups "TurboGears Trunk" group.
> To post to this group, send email to turbogears-
> tr...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears-tru...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en
> .
>
Sorry about the slow response; this was a feature put in in response to a requirement from sourceforge. The problem was that we were using lookup() to dispatch on project name, but the project name was in this case "lookup." It was believed that _default and _lookup would be less likely to conflict with parts of the path that you actually might *want*, so those were changed. Hope that helps explain the reasoning behind this.
-Rick
On Sep 23, 2010, at 7:35 AM, Christoph Zwerschke wrote:
It seems default() and lookup() have been renamed to _default()
and _lookup().
Since there was no response so far, I created http://trac.turbogears.org/ticket/2502
from this - maybe you can resolve that during the sprint this weekend.
Unfortunately, I cannot participate due to a family celebration, but
it's good to see TG2 moving forward.
I'm not against changing things, but changes must be accompanied by
proper documentation and tests, and we have this group to communicate
and discuss all larger changes, or API changes.
-- Christoph
--
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to turbogea...@googlegroups.com.
To unsubscribe from this group, send email to turbogears-tru...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en.
--
You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group.
To post to this group, send email to turbogea...@googlegroups.com.
To unsubscribe from this group, send email to turbogears-tru...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en.
The default() convention was taken over from CherryPy (TG 1), but I
agree it makes sense to use underscore names for such magic methods to
avoid name conflicts.
My main point was that if we make such changes in the API, the
documentation must be updated accordingly, and it must be also mentioned
in the TG 2.0 -> 2.1 migration notes because it will break old apps. The
reasoning behind the changes should also be mentioned becasue it's so
much easier to accept changes when they are properly documented and you
understand the reasoning behind them.
The excuse "we will add the documentation later" is not a good one
because according to my experience this hardly ever happens, we stick
with outdated docs, and newbies get a bad experience when they try out
the tutorials in the next release. Please always try to keep the docs
and tests in sync with the code.
-- Christoph