In article b11a8a0e-03ca-41c9-b0d0-c5180b6a2...@p15g2000vbl.googlegroups.com,
RunThePun ubershme...@gmail.com wrote:
On Aug 30, 10:33=A0pm, a...@pythoncraft.com (Aahz) wrote:
In article e09276e8-8152-4002-8366-4c12705a8...@l35g2000vba.googlegroups=
.com,
RunThePun =A0ubershme...@gmail.com
On Sep 1, 3:00 am, a...@pythoncraft.com (Aahz) wrote:
In article
b11a8a0e-03ca-41c9-b0d0-c5180b6a2...@p15g2000vbl.googlegroups.com,
RunThePun ubershme...@gmail.com wrote:
On Aug 30, 10:33=A0pm, a...@pythoncraft.com (Aahz) wrote:
In article
In article 7f82416a-53be-41b3-9503-1492454cc...@upsg2000gro.googlegroups.com,
RunThePun ubershme...@gmail.com wrote:
On Sep 1, 3:00=A0am, a...@pythoncraft.com (Aahz) wrote:
In article b11a8a0e-03ca-41c9-b0d0-c5180b6a2...@p15g2000vbl.googlegroups=
.com,
RunThePun =A0ubershme...@gmail.com wrote:
On Aug 30, 10:33 pm, a...@pythoncraft.com (Aahz) wrote:
In article
e09276e8-8152-4002-8366-4c12705a8...@l35g2000vba.googlegroups.com,
RunThePun ubershme...@gmail.com wrote:
I made a DictMixin where the keys are filenames and the values are the
file contents. It was very simple and
On Aug 29, 1:58 pm, Carl Banks pavlovevide...@gmail.com wrote:
On Aug 28, 10:37 pm, Joshua Judson Rosen roz...@geekspace.com wrote:
Carl Banks pavlovevide...@gmail.com writes:
On Aug 28, 2:42 pm, Terry Reedy tjre...@udel.edu wrote:
Carl Banks wrote:
I don't think it needs a
PS. Sorry for sending 2 posts -- the latter is the correct one.
Cheers,
*j
--
http://mail.python.org/mailman/listinfo/python-list
In article e09276e8-8152-4002-8366-4c12705a8...@l35g2000vba.googlegroups.com,
RunThePun ubershme...@gmail.com wrote:
I made a DictMixin where the keys are filenames and the values are the
file contents. It was very simple and easy to do thanks to DictMixin.
For example this code writes abc in a
On Sat, 29 Aug 2009 01:23:59 -0400, Joshua Judson Rosen wrote:
Robert Kern robert.k...@gmail.com writes:
On 2009-08-28 16:42 PM, Terry Reedy wrote:
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a
method to modify a value in place with a single key
On Aug 28, 10:37 pm, Joshua Judson Rosen roz...@geekspace.com wrote:
Carl Banks pavlovevide...@gmail.com writes:
On Aug 28, 2:42 pm, Terry Reedy tjre...@udel.edu wrote:
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a method
to modify a value in
In article 21e57363-4e92-41cb-9907-5aef96ad0...@o15g2000yqm.googlegroups.com,
RunThePun ubershme...@gmail.com wrote:
Anybody have any more ideas? I think python should/could havev a
syntax for overriding this behaviour, i mean, obviously the complexity
of supporting all operators with the
On Aug 26, 11:49 pm, RunThePun ubershme...@gmail.com wrote:
Anybody have any more ideas? I think python should/could havev a
syntax for overriding this behaviour, i mean, obviously the complexity
of supporting all operators with the getitem syntax could introduce
alot of clutter. But maybe
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a method
to modify a value in place with a single key lookup wouldn't
occasioanally be useful.
Augmented assignment does that.
For instance:
def increment(value):
return value+1
d = { 'a': 1 }
On 2009-08-28 16:42 PM, Terry Reedy wrote:
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a method
to modify a value in place with a single key lookup wouldn't
occasioanally be useful.
Augmented assignment does that.
No, it uses one __getitem__ and one
On Aug 28, 2:42 pm, Terry Reedy tjre...@udel.edu wrote:
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a method
to modify a value in place with a single key lookup wouldn't
occasioanally be useful.
Augmented assignment does that.
Internally uses two
Robert Kern robert.k...@gmail.com writes:
On 2009-08-28 16:42 PM, Terry Reedy wrote:
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a
method to modify a value in place with a single key lookup
wouldn't occasioanally be useful.
Augmented
Carl Banks pavlovevide...@gmail.com writes:
On Aug 28, 2:42 pm, Terry Reedy tjre...@udel.edu wrote:
Carl Banks wrote:
I don't think it needs a syntax for that, but I'm not so sure a method
to modify a value in place with a single key lookup wouldn't
occasioanally be useful.
On Aug 27, 6:58 am, Robert Kern robert.k...@gmail.com wrote:
On 2009-08-26 20:00 PM, Jan Kaliszewski wrote:
27-08-2009 o 00:48:33 Robert Kern robert.k...@gmail.com wrote:
On 2009-08-26 17:16 PM, RunThePun wrote:
I'd like to build a database wrapper using DictMixin and allow items
to
On 2009-08-27 01:49 AM, RunThePun wrote:
Anybody have any more ideas? I think python should/could havev a
syntax for overriding this behaviour, i mean, obviously the complexity
of supporting all operators with the getitem syntax could introduce
alot of clutter. But maybe there's an elegant
On 2009-08-26 17:16 PM, RunThePun wrote:
I'd like to build a database wrapper using DictMixin and allow items
to be appended by my own code. The problem is += is always understood
as setitem and getitem plainly.
d = MyDict()
d['a'] = 1
# this is the problem code that's I'd like to override.
I haven't tested it, but did you encounter a problem defining __iadd__ in
the class definition?
See:
http://docs.python.org/reference/datamodel.html#object.__iadd__
Cheers,
Ching-Yun Xavier Ho, Technical Artist
Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email:
27-08-2009 o 00:48:33 Robert Kern robert.k...@gmail.com wrote:
On 2009-08-26 17:16 PM, RunThePun wrote:
I'd like to build a database wrapper using DictMixin and allow items
to be appended by my own code. The problem is += is always understood
as setitem and getitem plainly.
d = MyDict()
27-08-2009 o 00:48:33 Robert Kern robert.k...@gmail.com wrote:
On 2009-08-26 17:16 PM, RunThePun wrote:
I'd like to build a database wrapper using DictMixin and allow items
to be appended by my own code. The problem is += is always understood
as setitem and getitem plainly.
d = MyDict()
On 2009-08-26 20:00 PM, Jan Kaliszewski wrote:
27-08-2009 o 00:48:33 Robert Kern robert.k...@gmail.com wrote:
On 2009-08-26 17:16 PM, RunThePun wrote:
I'd like to build a database wrapper using DictMixin and allow items
to be appended by my own code. The problem is += is always understood
as
23 matches
Mail list logo