On 01.12.2017 1:19, Greg Ewing wrote:
Ivan Pozdeev via Python-ideas wrote:
I needed to hold an external function reference in an object instance
(if I assigned it to an attribute, it was converted into an instance
method).
No, that only happens to functions stored in *class* attributes,
On 30 November 2017 at 05:11, Barry Warsaw wrote:
> Serhiy Storchaka wrote:
>> In 3.7 I have removed an old-deprecated plistlib.Dict. [1] Actually it
>> already was deprecated when the plistlib module was added to the regular
>> stdlib in Python 2.6.
>>
>> Raymond noticed that
Ivan Pozdeev via Python-ideas wrote:
I needed to hold an external function
reference in an object instance (if I assigned it to an attribute, it
was converted into an instance method).
No, that only happens to functions stored in *class* attributes,
not instance attributes.
>>> class A:
...
I use argparse.Namespace whenever I need this.
In reply to Chris Barker's concern of "is this code or is this data",
the last time I used it is when I needed to hold an external function
reference in an object instance (if I assigned it to an attribute, it
was converted into an instance
On Wed, Nov 29, 2017 at 10:52:51AM +0200, Serhiy Storchaka wrote:
> In 3.7 I have removed an old-deprecated plistlib.Dict. [1] Actually it
> already was deprecated when the plistlib module was added to the regular
> stdlib in Python 2.6.
>
> This is a dict subclass which allows to access items
On 29/11/2017 23:34, Chris Barker wrote:
On Wed, Nov 29, 2017 at 12:52 AM, Serhiy Storchaka
> wrote:
This is a dict subclass which allows to access items as attributes.
d = plistlib.Dict()
d['a'] = 1
assert d.a == 1
d.b =
On Wed, Nov 29, 2017 at 12:52 AM, Serhiy Storchaka
wrote:
> This is a dict subclass which allows to access items as attributes.
>
> d = plistlib.Dict()
> d['a'] = 1
> assert d.a == 1
> d.b = 2
> assert d['b'] == 2
>
> What do you think about reviving this type as general
On 29 November 2017 at 20:11, Barry Warsaw wrote:
> Serhiy Storchaka wrote:
> > In 3.7 I have removed an old-deprecated plistlib.Dict. [1] Actually it
> > already was deprecated when the plistlib module was added to the regular
> > stdlib in Python 2.6.
> >
> > Raymond noticed
On Wed, Nov 29, 2017 at 7:21 AM, Daniel Moisset
wrote:
> As reference of prior art, there is https://pypi.python.org/pypi/munch in
> PyPI
>
Box is also popular as it permits deeper nesting:
https://pypi.python.org/pypi/python-box/ https://github.com/cdgriffith/Box
As reference of prior art, there is https://pypi.python.org/pypi/munch in
PyPI
On 29 November 2017 at 05:52, Serhiy Storchaka wrote:
> In 3.7 I have removed an old-deprecated plistlib.Dict. [1] Actually it
> already was deprecated when the plistlib module was added to the
In 3.7 I have removed an old-deprecated plistlib.Dict. [1] Actually it
already was deprecated when the plistlib module was added to the regular
stdlib in Python 2.6.
This is a dict subclass which allows to access items as attributes.
d = plistlib.Dict()
d['a'] = 1
assert d.a == 1
d.b = 2
11 matches
Mail list logo