ire module.
>
Terry,
Thanks for your really helpful notes.
Best regards,
-
--
Mateusz Loskot
http://mateusz.loskot.net
--
View this message in context:
http://python.6.n6.nabble.com/Read-only-attribute-in-module-tp4378950p4464760.html
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
On 2/10/2012 6:11 AM, mloskot wrote:
The intent of xyz.flag is that it is a value set by the module internally.
xyz is a module wrapping a C library.
The C library defines concept of a global flag set by the C functions at
some events,
so user can check value of this flag.
I can provide access t
On Thu, 09 Feb 2012 22:27:50 -0500, Terry Reedy wrote:
> On 2/9/2012 8:04 PM, Steven D'Aprano wrote:
>
>> Python happily violates "consenting adults" all over the place. We have
>> properties, which can easily create read-only and write-once
>> attributes.
>
> So propose that propery() work at m
ible to map C API
semantics to Python concepts as 1:1.
-
--
Mateusz Loskot
http://mateusz.loskot.net
--
View this message in context:
http://python.6.n6.nabble.com/Read-only-attribute-in-module-tp4378950p4382967.html
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
On 10 February 2012 03:27, Terry Reedy wrote:
> On 2/9/2012 8:04 PM, Steven D'Aprano wrote:
>
>> Python happily violates "consenting adults" all over the place. We have
>> properties, which can easily create read-only and write-once attributes.
>
>
> So propose that propery() work at module level,
On 2/9/2012 8:04 PM, Steven D'Aprano wrote:
Python happily violates "consenting adults" all over the place. We have
properties, which can easily create read-only and write-once attributes.
So propose that propery() work at module level, for module attributes,
as well as for class attributes.
On Thu, 09 Feb 2012 23:32:59 +1100, Ben Finney wrote:
> Mateusz Loskot writes:
>
>> I'm wondering, is there any mean to implement attribute in module scope
>> which is read-only?
>
> Python is designed by and for consenting adults. Rather than
> restricting, instead use conventions to make your
On 09/02/2012 11:43, Mateusz Loskot wrote:
Hi,
I'm implementing Python 3 extension using the Python C API.
I am familiar with defining new types, implementing get/set for attributes, etc.
I'm wondering, is there any mean to implement attribute in module
scope which is read-only?
So, the follow
On 2/9/2012 6:43 AM, Mateusz Loskot wrote:
Hi,
I'm implementing Python 3 extension using the Python C API. I am
familiar with defining new types, implementing get/set for
attributes, etc.
I'm wondering, is there any mean to implement attribute in module
scope which is read-only?
Not that I kn
kot.net
--
View this message in context:
http://python.6.n6.nabble.com/Read-only-attribute-in-module-tp4378950p4380150.html
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
Mateusz Loskot writes:
> I'm wondering, is there any mean to implement attribute in module
> scope which is read-only?
Python is designed by and for consenting adults. Rather than
restricting, instead use conventions to make your intent clear to the
user of your library.
> So, the following
>
>
Hi,
I'm implementing Python 3 extension using the Python C API.
I am familiar with defining new types, implementing get/set for attributes, etc.
I'm wondering, is there any mean to implement attribute in module
scope which is read-only?
So, the following
import xyz
print(xyz.flag) # OK
xyz.fla
12 matches
Mail list logo