You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the name argument for fields allows any name to be assigned to a property, the Document class should at least try to avoid polluting the namespace of schemas.
Unknowingly overwriting a class attribute can sometimes produce confusing errors. TypeError: 'StringField' object is not callable is thrown from the class definition:
class Schema(Document):
walk = StringField()
Internal methods of Document and it's parents could be prefixed with an underscore to at least try to preserve more of the namespace for users and reduce the cases where an alias must be invoked.
The text was updated successfully, but these errors were encountered:
Unfortunately, Document's methods are public and documented and can not be renamed without breaking backwards compatibility. I'll consider renaming them in the next major version.
Although the
name
argument for fields allows any name to be assigned to a property, theDocument
class should at least try to avoid polluting the namespace of schemas.Unknowingly overwriting a class attribute can sometimes produce confusing errors.
TypeError: 'StringField' object is not callable
is thrown from the class definition:Internal methods of
Document
and it's parents could be prefixed with an underscore to at least try to preserve more of the namespace for users and reduce the cases where an alias must be invoked.The text was updated successfully, but these errors were encountered: