Re: [Python-Dev] [melbourne-pug] array matching

2010-04-29 Thread Filip
You could use dictionary of lists test = { A: [1, 3], B: [2, 4] } print test[A] [1, 3] test[A].append(5) print test[A] [1, 3, 5] Cheers, Fil _ From: melbourne-pug-bounces+filipz=3g.nec.com...@python.org [mailto:melbourne-pug-bounces+fil

Re: [Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-25 Thread Filip Gruszczyński
>> I'm inclined to leave it alone unless/until Raymond or somebody else >> steps up to really champion it. > > I'm okay with that. And I am looking for another bug, that I could get some python-fu from ;-) -- Filip Gruszczyński __

Re: [Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-25 Thread Filip Gruszczyński
vice, I'll provide according patch hopefully in the few days. -- Filip Gruszczyński ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Issue 6081: format string using mapping rather than kwargs

2010-03-24 Thread Filip Gruszczyński
to the old formatting. Another option is to have *args and one keyword with the mapping (instead of kwargs). I would appreciate any advice on this topic, even if this ticket would be dismissed altogether, as I would like to learn as much as possible on practices on developing Python. -- Filip

Re: [Python-Dev] Self in method body

2008-12-08 Thread Filip Gruszczyński
ing dungeon tiles for role playing games I astonishingly got same very similar value (484 * 4 / 35000) ;-) Maybe it's a feature of programming with a lot of gui stuff, which I do. But 1 of the 20 chars used for a self is quite a lot for me. -- Filip Gruszczyński ___

[Python-Dev] Self in method body

2008-12-08 Thread Filip Gruszczyński
s thinking, if this issue could be raised too, when new self syntax is proposed. Simple example looks like this: class bar: def bar.foo(): .x = 5 This could really save a lot of code, while attributes are still easily distinguishable. -- Filip Gruszczyński _

Re: [Python-Dev] Attribute error: providing type name

2008-12-01 Thread Filip Gruszczyński
x27;s it, thanks a lot for your help. -- Filip Gruszczyński ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Attribute error: providing type name

2008-11-30 Thread Filip Gruszczyński
means that I have to go to Phil Thompson at Riverbank and try to convince him to change the message. -- Filip Gruszczyński ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python

Re: [Python-Dev] Attribute error: providing type name

2008-11-30 Thread Filip Gruszczyński
reter or standard library. > > Cheers, > Nick. > > -- > Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia > --- > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/m

Re: [Python-Dev] Attribute error: providing type name

2008-11-30 Thread Filip Gruszczyński
values. I'll try to change this, without breaking anything. Thanks for help :) -- Filip Gruszczyński ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/o

Re: [Python-Dev] Attribute error: providing type name

2008-11-30 Thread Filip Gruszczyński
u'll get support for this, unless it's a really > inconvenient spot that requires a gross hack to print the type name. > Post a patch on the bug tracker. > > > -- > Adam Olsen, aka Rhamphoryncus > -- Filip Gruszczyński __

[Python-Dev] Attribute error: providing type name

2008-11-30 Thread Filip Gruszczyński
, you must do one of two things: add print statement just before the line with the exception and check the type or iterate over all classes that might appear them. Showing the class name would solve this problem and could save a lot of time. -- Filip Gruszczyński __