On Wed, Dec 22, 2010 at 08:10:14AM -0800, Thomas G. Willis wrote:
> Geez it was a boneheaded move on my part. I was importing those same
> views into a different module so I could delegate to them. It was a
> hack that I wondered whether it would bite me in the ass later, and it
> did.

It could be argued that config.scan() should not pick up objects that
were imported from other modules.

Stdlib's doctest, for example, checks __module__ of all the functions
before assuming it needs to search for doctests in that function's
__doc__.

This would eliminate one source of confusing errors, but add a different
one: badly-written decorators that do not preserve __module__ might
prevent views from being picked up by config.scan().

Marius Gedminas
-- 
At one job, for a short time my desktop HP (running HPUX) was being used as a
print server. I soon found out that having something heavy in front of the plug
was a good idea, after kicking it out of the outlet a couple of times. I used
my old TRS-80 4P, doubtless the slowest computer ever to perform a critical
function at that company.
        -- David Thornley

Attachment: signature.asc
Description: Digital signature

Reply via email to