OrderedProperties suffers from clashes between table columns names and its own methods

Issue #3475 resolved
Alessandro Molina
created an issue

OrderedProperties provides the getattr method which allows to lookup for column information using the dot notation, the issue is that in case my column was actually called like a method of OrderedProperties it returns the method instead of the column.

This is probably not a bug, but it's an unexpected behaviour in most cases. See https://github.com/TurboGears/tg2/issues/64 for origin of this issue.

Probably dot notation access should be deprecated to avoid confusion and only allow dictionary stile access?

Comments (3)

  1. Michael Bayer repo owner

    this is the object that does table.c.columname so deprecation would be pretty extreme. getattr() shouldn't be used with this object so a warning is added thanks for reporting!

  2. Log in to comment