first:  I wonder why you would expect something different in a dynamic
system (references being created and destroyed beyond your control - this
will not change);
Here's what I got playing with this (ipython output;  I snipped noise):

/-------------------------------------------
In [2]: db=SQLDB()

In [3]: db.define_table('ytable', SQLField('yfield'))
Out[3]: <SQLStorage {'yfield': <gluon.sql.SQLField object at 0x01255BD0>,
....
In [4]: f=db.ytable.yfield

In [5]: f._db
Out[5]: <SQLStorage {'_connection': <sqlite3.Connection object at
0x011EF720>,
....
In [6]: def getName(obj): return([k for k,v in vars().items() if v is obj])
   ...:

In [7]: f._db.tables
Out[7]: ['ytable']

In [8]: f._db.ytable.fields
Out[8]: ['id', 'yfield']

In [9]: getName(db)
Out[9]: ['obj']

In [10]: f._db
Out[10]: <SQLStorage {'_connection': <sqlite3.Connection object at
0x011EF720>,
...

In [11]: db
Out[11]: <SQLStorage {'_connection': <sqlite3.Connection object at
0x011EF720>,
...
...
In [18]: [k for k,v in vars().items() if v is f._db]
Out[18]: ['__', 'db', '_5', '_11', '_10', '___']

In [19]: getName(db)
Out[19]: ['obj']

In [20]: getName(f._db)
Out[20]: ['obj']

In [21]: [k for k,v in vars().items() if v is f._db]
Out[21]: ['db', '_5', '_11', '_10']

In [22]:
\-------------------------------------------

Similar situation as before (as I would expect)
.....


On Fri, Dec 19, 2008 at 10:02 PM, DenesL <[email protected]> wrote:

>
> Yarko, could you please check if you get any less "garbage" on your
> end using:
>
> [ k for k,v in vars().items() if v is f._db ]
>
> assuming f is the field ( f=db.table.field ).
> Thanks.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to