coding question

Mignon Laurent <mignonlm-/[email protected]> Fri, 18 Aug 2006 05:16:04 -0700 (PDT)
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
--===============1488693761==
Content-Type: multipart/alternative; boundary="0-885705898-1155903364=:2454"
Content-Transfer-Encoding: 7bit

--0-885705898-1155903364=:2454
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hy,

In your python abstraction layer (pgsql.py) you directly access the __dic=
t__ .  If I understand the code, you use this mechanism in conjunction of=
 the overriding of __setattr__ to control the acces to some attributes th=
at you want  readonly. =20
I can understand that that was in the past the only way to control access=
 to some attributes. Today, python allow you to define property and to co=
ntrol access to a variable through getter and setter ...=20
The fact that the code access direclyt to the __dict__ is a problem for m=
e when I use this module in threads running in restricted mode (access is=
 denied!).  Can I rewrite the code to use property and avoid the access t=
o the __dict__. Do you think that it is a good thing?=20

Laurent Mignon

Software AG Belgium
Senior Software Engineer
=20
 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
--0-885705898-1155903364=:2454
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hy,<br><br>In your python abstraction layer (pgsql.py) you directly acces=
s the __dict__ .&nbsp; If I understand the code, you use this mechanism i=
n conjunction of the overriding of __setattr__ to control the acces to so=
me attributes that you want&nbsp; readonly.&nbsp; <br>I can understand th=
at that was in the past the only way to control access to some attributes=
. Today, python allow you to define property and to control access to a v=
ariable through getter and setter ... <br>The fact that the code access d=
ireclyt to the __dict__ is a problem for me when I use this module in thr=
eads running in restricted mode (access is denied!).&nbsp; Can I rewrite =
the code to use property and avoid the access to the __dict__. Do you thi=
nk that it is a good thing? <br><br>Laurent Mignon<br><br>Software AG Bel=
gium<br>Senior Software Engineer<br> <p>&#32;____________________________=
______________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail h=
as the best spam protection around
 <br>http://mail.yahoo.com=20
--0-885705898-1155903364=:2454--


--===============1488693761==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--===============1488693761==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pypgsql-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pypgsql-users

--===============1488693761==--