On Wed, Aug 9, 2017 at 2:12 PM, Ken MacKenzie <deviloc...@gmail.com> wrote:
> So I have been using SQL alchemy to convert some unidata data stores into ms
> sql data.
>
> One of the GL components in our system is called object, well object code.
>
> Most refer to it as object so when I defined my model for the table
> including it I named it object.
>
> It all works fine, but object is technically is something else in python.  I
> guess in theory within the lexical scope of that class I am redefining what
> object means.
>
> Is this a big deal?  I am viewing it as a big deal and I want to get it
> changed, which requires some coordination because what was an experiment
> turned into an in use prototype (ain't that always the way).
>
> I just wanted to get some more experienced feedback in case any of the data
> consumers start asking why I am wanting to change something that works to
> rename this field.

the column can be named object in the database, that's just a string name.

Python side, you can name a field "object", Python doesn't complain:

>>> class Foo(object):
...     def __init__(self, object):
...         self.object = object
...
>>> f1 = Foo(object='hi')
>>> print f1.object
hi

if you wanted to be perfect you'd name it "object_" or something else
totally but it isn't essential.



>
> Ken
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
> description.
> ---
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to