Thank you.
Uri.
אורי
u...@speedy.net
On Tue, Jul 9, 2024 at 6:40 PM Barry Scott wrote:
>
>
> On 9 Jul 2024, at 06:13, אורי via Python-list <python-list@python.org>
> wrote:
>
> I tried to subscribe to Python-ideas
>
>
> These days ideas are discussed on https://discuss.python.org/
> It is
> On 9 Jul 2024, at 06:13, אורי via Python-list <python-list@python.org>
> wrote:
>
> I tried to subscribe to Python-ideas
These days ideas are discussed on https://discuss.python.org/
It is rare to see an idea on the mailing list.
Barry
--
https://mail.python.org/mailman/listinfo/pyt
Hi,
Please look at this Stack Overflow post:
https://stackoverflow.com/questions/78722378/parser-add-mutually-exclusive-group-how-can-i-set-a-default-value
1. Is there a way to add a default to parser add_mutually_exclusive_group
groups - a value that will be set by default? In this case I
want t
On Wed, 23 Mar 2022 01:55:37 -0700 (PDT), Kazuya Ito
declaimed the following:
>Add "trun()" function to Python to truncate decimal part.
You'll have to define what specific behavior you think is missing from
the currently available functions?
>>> plusover = 2.78
>>> plusunder = 3.14
>>>
On 23/03/2022 03.55, Kazuya Ito wrote:
Add "trun()" function to Python to truncate decimal part.
Which of these should its behavior copy?
from math import pi
int(pi)
3
pi-int(pi)
0.14159265358979312
--
Michael F. Stemper
This post contains greater than 95% post-consumer bytes by weight
Add "trun()" function to Python to truncate decimal part.
--
https://mail.python.org/mailman/listinfo/python-list
`pathlib` trims trailing slashes by default, but certain packages require
trailing slashes. In particular, `cx_Freeze.bdist_msi` option "directories" is
used to build the package directory structure of a program and requires
trailing slashes.
Does anyone think it would be a good idea to add a f
After using https://docs.python.org/3/library/fileinput.html to open a file for
inplace filtering, a backup is created before output is redirected to the new
file. It is possible, but non-trivial and non-obvious, to bail out of this
situation, putting the backed up file back in place and ending
ubdirectories, which might be useful but
is usually misleading and on some OSes unsupported). So the programme
should be pickier anyway.
That all being said, I think I would like to put in a feature request
for a non-blocking option. How should I go about doing so?
I agree with the suggestion a
e across, you probably need to check
anyway.
> That all being said, I think I would like to put in a feature request for a
> non-blocking option. How should I go about doing so?
Hmm, there are a few options. If you reckon it's pretty easy, you
could just go straight to a GitHub pull
diagnose.
That all being said, I think I would like to put in a feature request for a
non-blocking option. How should I go about doing so?
Thanks again,
Dan
-Original Message-
From: Chris Angelico
Sent: Thursday, December 27, 2018 7:10 PM
To: python-list@python.org
Subject: Re: Undocume
On Sat, Dec 29, 2018 at 4:24 AM Grant Edwards wrote:
>
> On 2018-12-27, Daniel Ojalvo via Python-list wrote:
>
> open("this_is_a_pipe")
> >
>
> Opening a tty device can also block[1]. However, if somebody is using
> the open() builtin on tty devices that's probably the least of their
> prob
On 2018-12-27, Daniel Ojalvo via Python-list wrote:
open("this_is_a_pipe")
>
Opening a tty device can also block[1]. However, if somebody is using
the open() builtin on tty devices that's probably the least of their
problems.
[1] Technically, opening any character-mode device could block
kludge a solution.
>
Hmm. I disagree that the docs are deceptive here; I would normally
expect open() to block if it needs to. But looking at this as a
feature request, it seems reasonable. Actually, it's not even that
hard to do, since open() is already pluggable:
rosuav@sikorsky:~/t
os.open(, os.O_RDONLY| os.O_NONBLOCK) , mode='rb') as
file_obj:
I think this is mostly a documentation bug because this wouldn't be expected
behavior to someone reading the docs, but open is behaving as the fifo man
page<http://man7.org/linux/man-pages/man7/fifo.7.html> is docu
Am 15.05.15 um 05:58 schrieb Skybuck Flying:
Thanks for the ideas, I haven't tried them yet.
I wonder if they will work in a multi-threaded fashion.
I doubt it.
The run_script runs in it's own thread.
It would be of enormous help if you would create a minimal script just
like the above for
"Steven D'Aprano" wrote in message
news:5553145b$0$9$c3e8...@news.astraweb.com...
On Wednesday 13 May 2015 17:27, Christian Gollwitzer wrote:
A clean way to exit your script could be to raise an exception. It
should propagate to the toplevel and halt your script. However it is not
poss
On Wednesday 13 May 2015 17:27, Christian Gollwitzer wrote:
> A clean way to exit your script could be to raise an exception. It
> should propagate to the toplevel and halt your script. However it is not
> possible to back and resume the execution.
while True:
try:
run_script() # May
Am 12.05.15 um 22:18 schrieb Skybuck Flying:
Thanks for suggestion, but I need a solution which can work in SikuliX
as well.
What the hell is that?
Especially inside an observer handler that would be ideal.
So far os.kill() is not supported in SikuliX as far as I can tell.
OK a quick look
"Dave Angel" wrote in message
news:mailman.354.1431345441.12865.python-l...@python.org...
On 05/11/2015 07:46 AM, Skybuck Flying wrote:
Hello,
Sometimes it can be handy to "interrupt/reset/reposition" a running
script.
For example something externally goes badly wrong.
"
os.kill()
then
On 2015-05-11, Steven D'Aprano wrote:
> On Mon, 11 May 2015 09:57 pm, Dave Angel wrote:
>
>> On 05/11/2015 07:46 AM, Skybuck Flying wrote:
>>> Hello,
>>>
>>> Sometimes it can be handy to "interrupt/reset/reposition" a running
>>> script.
>>>
>>> For example something externally goes badly wrong.
>
On 05/11/2015 08:35 AM, Steven D'Aprano wrote:
On Mon, 11 May 2015 09:57 pm, Dave Angel wrote:
On 05/11/2015 07:46 AM, Skybuck Flying wrote:
Hello,
Sometimes it can be handy to "interrupt/reset/reposition" a running
script.
For example something externally goes badly wrong.
os.kill()
the
On Mon, 11 May 2015 09:57 pm, Dave Angel wrote:
> On 05/11/2015 07:46 AM, Skybuck Flying wrote:
>> Hello,
>>
>> Sometimes it can be handy to "interrupt/reset/reposition" a running
>> script.
>>
>> For example something externally goes badly wrong.
>>
>
> os.kill()
>
> then in your process, handl
Dave Angel :
> On 05/11/2015 07:46 AM, Skybuck Flying wrote:
>> Hello,
>>
>> Sometimes it can be handy to "interrupt/reset/reposition" a running script.
>> For example something externally goes badly wrong.
>
> os.kill()
>
> then in your process, handle the exception, and do whatever you think
> i
On 05/11/2015 07:46 AM, Skybuck Flying wrote:
Hello,
Sometimes it can be handy to "interrupt/reset/reposition" a running script.
For example something externally goes badly wrong.
os.kill()
then in your process, handle the exception, and do whatever you think is
worthwhile.
--
DaveA
-
Hello,
Sometimes it can be handy to "interrupt/reset/reposition" a running script.
For example something externally goes badly wrong.
The script is unaware of this.
Current solution would require to have an "Abort" boolean everywhere.
The abort boolean could then be set to True to indicate al
On 2/11/2015 9:48 PM, Rustom Mody wrote:
On Thursday, February 12, 2015 at 7:57:48 AM UTC+5:30, Terry Reedy wrote:
If one saves the shell with 'save as', the filename is added to the
title bar. If one does something more, the name in bracketed with *s to
indicate the the memory buffer has bee
On 12/02/2015 02:48, Rustom Mody wrote:
[BTW I have some other feature requests too. Is this the best forum to talk of
them? And thanks for your work on idle :-) ]
Here is as good a place as any although there is an IDLE development
mailing list at https://mail.python.org/mailman/listinfo/i
On Thu, Feb 12, 2015 at 1:27 PM, Terry Reedy wrote:
> However, when one quits, then, unlike a regular edit window, there is no
> ask-to-save warning. Is this what you want? This would seem reasonable and
> likely easy. (I would, however, not want the prompt when the buffer has not
> been saved
On Thursday, February 12, 2015 at 7:57:48 AM UTC+5:30, Terry Reedy wrote:
> On 2/11/2015 1:00 PM, Mark Lawrence wrote:
> > On 11/02/2015 13:11, Rustom Mody wrote:
> >> Context:
> >> I am using idle for taking python classes.
>
> Teaching or taking?
Teaching -- I would like to mail¹ students the i
On 2/11/2015 1:00 PM, Mark Lawrence wrote:
On 11/02/2015 13:11, Rustom Mody wrote:
Context:
I am using idle for taking python classes.
Teaching or taking?
Finish the class and run out usually in a hurry and forget to save the
idle interaction window.
Do you mean the shell window?
Would l
On 11/02/2015 13:11, Rustom Mody wrote:
Context:
I am using idle for taking python classes.
Finish the class and run out usually in a hurry and forget to save the
idle interaction window. Would like to save it so that I can mail it to the
students.
In emacs I could set a hook to make arbitrary
On 11.02.2015 14:29, Rustom Mody wrote:
So getting up and running with minimal headache is an important priority.
Yes true. I consider Notebooks as a way to do "frontal" teaching, not
necessarily usefull if students have to redo what you are doing on
screen. For that, notebooks are rather pro
On Wednesday, February 11, 2015 at 6:50:35 PM UTC+5:30, Fabien wrote:
> On 11.02.2015 14:11, Rustom Mody wrote:
> > Context:
> > I am using idle for taking python classes.
>
> I know this is not your question, but: have you considered using iPython
> notebooks for teaching? They save automaticall
On 11.02.2015 14:11, Rustom Mody wrote:
Context:
I am using idle for taking python classes.
I know this is not your question, but: have you considered using iPython
notebooks for teaching? They save automatically, look nice, and can be
sent as code, html, rst, ...
Fabien
--
https://mail.py
Context:
I am using idle for taking python classes.
Finish the class and run out usually in a hurry and forget to save the
idle interaction window. Would like to save it so that I can mail it to the
students.
In emacs I could set a hook to make arbitrary 'buffers' like the python-idle
shell be
On 2013-11-22 18:15, Neal Becker wrote:
Robert Kern wrote:
On 2013-11-22 16:52, Neal Becker wrote:
Robert Kern wrote:
On 2013-11-22 14:56, Neal Becker wrote:
I use arparse all the time and find it serves my needs well. One thing I'd
like
to see. In the help message, I'd like to automatica
Robert Kern wrote:
> On 2013-11-22 16:52, Neal Becker wrote:
>> Robert Kern wrote:
>>
>>> On 2013-11-22 14:56, Neal Becker wrote:
I use arparse all the time and find it serves my needs well. One thing I'd
like
to see. In the help message, I'd like to automatically add the default
On 2013-11-22 16:52, Neal Becker wrote:
Robert Kern wrote:
On 2013-11-22 14:56, Neal Becker wrote:
I use arparse all the time and find it serves my needs well. One thing I'd
like
to see. In the help message, I'd like to automatically add the default
values.
What I'd like to see is:
--siz
Robert Kern wrote:
> On 2013-11-22 14:56, Neal Becker wrote:
>> I use arparse all the time and find it serves my needs well. One thing I'd
>> like
>> to see. In the help message, I'd like to automatically add the default
>> values.
>>
>> For example, here's one of my programs:
>>
>> python3 te
On 2013-11-22 14:56, Neal Becker wrote:
I use arparse all the time and find it serves my needs well. One thing I'd like
to see. In the help message, I'd like to automatically add the default values.
For example, here's one of my programs:
python3 test_freq3.py --help
usage: test_freq3.py [-
I use arparse all the time and find it serves my needs well. One thing I'd
like
to see. In the help message, I'd like to automatically add the default values.
For example, here's one of my programs:
python3 test_freq3.py --help
usage: test_freq3.py [-h] [--size SIZE] [--esnodB ESNODB] [--tau
On 4/19/13 2:27 PM, Terry Jan Reedy wrote:
On 4/19/2013 10:27 AM, Matthew Gilson wrote:
) It seems to me that the operator module should have a `not_in` or
`not_contains` function. It seems asymmetric that there exists a
`is_not` function which implements `x is not y` but there isn't a
functio
On 4/19/2013 10:27 AM, Matthew Gilson wrote:
) It seems to me that the operator module should have a `not_in` or
`not_contains` function. It seems asymmetric that there exists a
`is_not` function which implements `x is not y` but there isn't a
function to represent `x not in y`.
There is also
I believe that I read somewhere that this is the place to start
discussions on feature requests, etc. Please let me know if this isn't
the appropriate venue (and what the appropriate venue would be if you know).
This request has 2 related parts, but I think they can be considered
seperately:
On Wed, Apr 13, 2011 at 11:50 AM, rantingrick wrote:
> In the IDLE shell when pressing the key combos "Control+Up" and
> "Control+Down" the insertion cursor should jump to the nearest prompt
> (>>>) above or below it's current position respectively.
>
> Note: In the Editor Window of IDLE the curre
Hello folks,
In the IDLE shell when pressing the key combos "Control+Up" and
"Control+Down" the insertion cursor should jump to the nearest prompt
(>>>) above or below it's current position respectively.
Note: In the Editor Window of IDLE the current behavior is for the
insertion cursor to jump
On 04/11/2011 05:44 PM, Chris Angelico wrote:
On Tue, Apr 12, 2011 at 8:41 AM, MRAB wrote:
I'm not sure that "setdefault" should take **kw args for this because
of its existing argument structure (key + optional value).
A new method like "updatedefault" may be better, IMHO. It would act
like "
On 11/04/2011 23:44, Chris Angelico wrote:
On Tue, Apr 12, 2011 at 8:41 AM, MRAB wrote:
I'm not sure that "setdefault" should take **kw args for this because
of its existing argument structure (key + optional value).
A new method like "updatedefault" may be better, IMHO. It would act
like "upd
On Mon, Apr 11, 2011 at 2:35 PM, rantingrick wrote:
>
> setdefault should take **kw args in the case of needing to set
> multiple defaults at one time. I would even settle for an *arg list if
> i had to.
What would the return value be? dict.setdefault() doesn't currently
just return None you know
On Tue, Apr 12, 2011 at 8:41 AM, MRAB wrote:
> I'm not sure that "setdefault" should take **kw args for this because
> of its existing argument structure (key + optional value).
>
> A new method like "updatedefault" may be better, IMHO. It would act
> like "update" except that it wouldn't overwrit
On 11/04/2011 23:16, Westley Martínez wrote:
On Mon, 2011-04-11 at 14:35 -0700, rantingrick wrote:
setdefault should take **kw args in the case of needing to set
multiple defaults at one time. I would even settle for an *arg list if
i had to. Anything is better than...
d.setdefault(blah, blah)
On Mon, 2011-04-11 at 14:35 -0700, rantingrick wrote:
> setdefault should take **kw args in the case of needing to set
> multiple defaults at one time. I would even settle for an *arg list if
> i had to. Anything is better than...
>
> d.setdefault(blah, blah)
> d.setdefault(blah, blah)
> d.setdefa
setdefault should take **kw args in the case of needing to set
multiple defaults at one time. I would even settle for an *arg list if
i had to. Anything is better than...
d.setdefault(blah, blah)
d.setdefault(blah, blah)
d.setdefault(blah, blah)
d.setdefault(blah, blah)
if blah is not blah:
d
On 9/24/2010 2:45 PM, Tim Chase wrote:
On 09/24/10 13:01, Ethan Furman wrote:
John Posner wrote:
Another "missing feature" candidate: sublist
>>> 'bc' in 'abcde'
True
>>> list('bc') in list('abcde')
False
I'm not aware of any idioms, but how about a simple function?
Foldable into a one
On 09/24/10 13:01, Ethan Furman wrote:
John Posner wrote:
Another "missing feature" candidate: sublist
>>> 'bc' in 'abcde'
True
>>> list('bc') in list('abcde')
False
I'm not aware of any idioms, but how about a simple function?
def listinlist(list1, list2):
"checks if
John Posner wrote:
Another "missing feature" candidate: sublist
>>> 'bc' in 'abcde'
True
>>> list('bc') in list('abcde')
False
I'm not aware of any idioms, but how about a simple function?
def listinlist(list1, list2):
"checks if list1 is in list2"
if not list1:
re
On 9/24/2010 4:21 AM, Peter Otten wrote:
If you are not interested in the position of the substr use the "in"
operator:
if substr in s:
print "found"
else:
print "not found"
Another "missing feature" candidate: sublist
>>> 'bc' in 'abcde'
True
>>> list('bc') in list('abc
On Freitag 24 September 2010, Wim Feijen wrote:
> would really like having a string.contains('...') function
> which returns either True or False. I know I can mimick this
> behaviour by saying string.find('...') != -1 , however, I
> find this harder to read.
>>> a = 'xy134'
>>> '13' in a
True
>>
Wim Feijen wrote:
> I was wondering, how to make a feature request?
You can post suggestions to improve python on the python-ideas mailing list
or make feature requests on the bugtracker at bugs.python.org
> I would really like having a string.contains('...') function which
Hello,
I was wondering, how to make a feature request?
I would really like having a string.contains('...') function which returns
either True or False. I know I can mimick this behaviour by saying
string.find('...') != -1 , however, I find this harder to read.
string.conta
On Apr 17, 1:14 am, "Gabriel Genellina"
wrote:
> En Thu, 15 Apr 2010 16:37:37 -0300, gert escribió:
>
> > [a wget -r like implementation in python3]
> > So I can make a recursive http download script
>
> What about calling wget itself? subprocess.call(['wget',...])
>
The only dependency I would
On Apr 16, 3:41 am, alex23 wrote:
> On Apr 16, 5:37 am, gert wrote:
>
> > So I can make a recursive http download script
> > My goal is a one click instruction to install and launch my
> > projecthttp://code.google.com/p/appwsgi/
>
> Here's Guido's take on wget:
>
> import sys, urllib
>
En Thu, 15 Apr 2010 16:37:37 -0300, gert escribió:
[a wget -r like implementation in python3]
So I can make a recursive http download script
What about calling wget itself? subprocess.call(['wget',...])
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 16, 5:37 am, gert wrote:
> So I can make a recursive http download script
> My goal is a one click instruction to install and launch my
> projecthttp://code.google.com/p/appwsgi/
Here's Guido's take on wget:
import sys, urllib
def reporthook(*a): print a
for url in sys.argv[1
So I can make a recursive http download script
My goal is a one click instruction to install and launch my project
http://code.google.com/p/appwsgi/
--
http://mail.python.org/mailman/listinfo/python-list
Brad Harms a écrit :
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote:
(snip)
2.) Attributes whose values are determined or assigned dynamically by
indirectly calling a function (like properties and instancemethods)
Yes, the term “property” seems to do what you want.
I wasn't asking what
Ben Finney a écrit :
Brad Harms writes:
(snip)
2.) Attributes whose values are determined or assigned dynamically by
indirectly calling a function (like properties and instancemethods)
Yes, the term “property” seems to do what you want.
The property type is just one possible application o
Brad Harms a écrit :
On Tue, 2009-12-01 at 16:58 +0100, Bruno Desthuilliers wrote:
The Music Guy a écrit :
(snip)
Lie Ryan, I think I see what you're saying about using __dict__ to add
members
No "members" in Python - only attributes.
to a class, but it's not quite the same. __dict__ is onl
On Thu, 03 Dec 2009 23:12:39 -0600, Brad Harms wrote:
> On Tue, 2009-12-01 at 14:38 +, Steven D'Aprano wrote:
[...]
>> It's just special double-underscore methods like __init__ __add__ etc
>> that have to be in the class rather than the instance. (To be precise,
>> you can add such a method to
On Fri, 04 Dec 2009 09:00:42 +, Steven D'Aprano wrote:
> Not all such attributes are actually found in instance.__dict__.
...I hadn't even considered __slots__ yet. Hm...
> Or dynamic attributes returned by __getattr__ or __getattribute__.
I'm looking for a generic term, because it's too cum
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote:
> Brad Harms writes:
>
>> Anyway, it looks like the docs agree with you
>> (http://docs.python.org/glossary.html#term-attribute), so I'm not going
>> to argue.
>
> That's good, because the terms are quite well established in Python
> termino
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote:
> Brad Harms writes:
...
>> 1.) "Regular" attributes, ie. those that are shortcuts to items in the
>> directly associated object's __dict__,
>
> I don't know what you mean by “shortcuts to items”. The names are looked
> up in dictionaries; wh
Brad Harms writes:
> Anyway, it looks like the docs agree with you
> (http://docs.python.org/glossary.html#term-attribute), so I'm not
> going to argue.
That's good, because the terms are quite well established in Python
terminology.
> However, for the purpose of clean communication, I'd still
On Tue, 2009-12-01 at 14:38 +, Steven D'Aprano wrote:
> On Mon, 30 Nov 2009 18:55:46 -0800, The Music Guy wrote:
>
> > Lie Ryan, I think I see what you're saying about using __dict__ to add
> > members to a class, but it's not quite the same. __dict__ is only for
> > attributes, NOT properties
On Tue, 2009-12-01 at 16:58 +0100, Bruno Desthuilliers wrote:
> The Music Guy a écrit :
> (snip)
> > Lie Ryan, I think I see what you're saying about using __dict__ to add
> > members
>
> No "members" in Python - only attributes.
> > to a class, but it's not quite the same. __dict__ is only for
>
On Tue, 2009-12-01 at 14:38 +, Steven D'Aprano wrote:
> On Mon, 30 Nov 2009 18:55:46 -0800, The Music Guy wrote:
>
> > Lie Ryan, I think I see what you're saying about using __dict__ to add
> > members to a class, but it's not quite the same. __dict__ is only for
> > attributes, NOT properties
On Dec 1, 10:21 am, Raymond Hettinger wrote:
> [Gregory Ewing]
>
> > >>I just posted to my blog about a feature that I'd like to see added to
> > >>Python.
>
> > >>http://alphaios.blogspot.com/2009/11/python-string-inferred-names-wor...
>
> > I don't think getattr and setattr are used anywhere nea
[Gregory Ewing]
> >>I just posted to my blog about a feature that I'd like to see added to
> >>Python.
>
> >>http://alphaios.blogspot.com/2009/11/python-string-inferred-names-wor...
>
> I don't think getattr and setattr are used anywhere near
> frequently enough to justify special syntax.
Perhaps
The Music Guy a écrit :
(snip)
Lie Ryan, I think I see what you're saying about using __dict__ to add
members
No "members" in Python - only attributes.
to a class, but it's not quite the same. __dict__ is only for
attributes, NOT properties, methods, etc. which all come from the
class of an o
On Mon, 30 Nov 2009 18:55:46 -0800, The Music Guy wrote:
> Lie Ryan, I think I see what you're saying about using __dict__ to add
> members to a class, but it's not quite the same. __dict__ is only for
> attributes, NOT properties, methods, etc. which all come from the class
> of an object rather
> Brad Harms FearsomeDragonfly at gmail.com
> Mon Nov 30 05:04:37 CET 2009
>
> That was a relatively simple example; classes as simple as the ones
> generated by the It is more likely that the class generation could would
> appear in a metaclass's class constructor or decorator function, and there
Brad Harms wrote:
Well, yes, the names would have to be determined at run time. That's
what getattr and setattr do, except that that do it in the context of an
object rather than the local scope. However, I was under the impression
that python's mechanism for looking up local names was the sam
On 12/1/2009 3:35 AM, Bruno Desthuilliers wrote:
Lie Ryan a écrit :
On 11/28/2009 3:08 PM, The Music Guy wrote:
(snip the part about the proposed feature - which I don't like but
that's not the point)
My
projects rely on a lot of metaclassing for the automatic generation of
properties and me
Lie Ryan a écrit :
On 11/28/2009 3:08 PM, The Music Guy wrote:
(snip the part about the proposed feature - which I don't like but
that's not the point)
My
projects rely on a lot of metaclassing for the automatic generation of
properties and methods, which saves tremendous amounts of coding.
P.S., not trying to start a flame war. It's just that I can't stand to
keep silent on the matter any longer.
-- Brad Harms
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Simpson writes:
> The Zen promotes the guideline that there should be only one (obvious)
> way to do most things and that's a surprisingly effective design rule.
It's also important to realise that the Zen places the “preferably only
one” in a parenthetical, and note that “preferably” qu
Lie Ryan a écrit :
(snip)
> setattr, getattr, and delattr are already sugar for accessing
instance.__dict__.
They are actually much more than that - else descriptors and inheritance
wouldn't work.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Nov 29, 2009 at 11:01 PM, Brad Harms wrote:
>
> May the Penguin in the sky bless your every subroutine,
>
Um...feel free to ignore that. >_>
-- Brad Harms
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Nov 29, 2009 at 9:59 PM, Carl Banks wrote:
> Another thing that can be determined through common sense is that if
> you have object that you are calling getattr and setattr on so much
> that you think you need special syntax, you should have been using a
> dict.
>
(Re-send; original was s
On Sun, Nov 29, 2009 at 7:49 PM, Lie Ryan wrote:
> On 11/29/2009 12:22 PM, The Music Guy wrote:
>
>> When I first started seeing @ show up in Python code, I said "what the
>> heck is that? It looks so weird and _ugly_.I would never try to mess
>> with that." But I started seeing it more and more,
On Nov 28, 3:38 am, The Music Guy wrote:
> On Nov 28, 3:07 am, Lie Ryan wrote:
> > If you use it a lot, it is likely 1) you have abused class syntax for
> > what should have been a dict or 2) what you need is to override
> > __getattr__/__getattribute__ and __setattr__
>
> Oh boy...here we go. :|
On Nov 26, 3:43 pm, The Music Guy wrote:
> That aside, I still feel that a new syntax would be a better solution
> than a new class. And, anyway, what I'm proposing isn't *quite* the
> same as what Ben North proposed. Ben's idea was *strictly* to create
> shorthand syntax to the getattr/setattr/de
On 11/29/2009 12:22 PM, The Music Guy wrote:
When I first started seeing @ show up in Python code, I said "what the
heck is that? It looks so weird and _ugly_.I would never try to mess
with that." But I started seeing it more and more, so I asked #python
what it was. They told me about decorators
The Music Guy wrote:
When I first started seeing @ show up in Python code, I said "what the
heck is that?
For future reference, PySymbols.html at
http://code.google.com/p/xploro/downloads/list
answers all such symbol questions.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Nov 29, 2009 at 6:58 AM, inhahe wrote:
> Did you say you were using gmail to post? I think mailing lists tend to
> have issues with gmail because it puts html in the message or something like
> that. Btw I recently set up this mailing list to send me a message back
> when I successfully
On Sun, Nov 29, 2009 at 5:15 AM, The Music Guy
wrote:
> Okay, I'm having a really hard time telling which messages are getting
> on to the list and which ones aren't. Some of the messages I send show
> up in the comp.lang.python mirror in Google Groups, and some aren't.
> Others show up on the Gro
Okay, I'm having a really hard time telling which messages are getting
on to the list and which ones aren't. Some of the messages I send show
up in the comp.lang.python mirror in Google Groups, and some aren't.
Others show up on the Groups mirror, but don't show up in Gmail, or
show up in a differe
>
>
On Sat, Nov 28, 2009 at 9:39 PM, Steven D'Aprano <
st...@remove-this-cybersource.com.au> wrote:
>
> Removing code redundancy is all very well, but beware of turning into an
>
>> architecture astronaut:
>
>>
> http://www.joelonsoftware.com/articles/fog18.html
>
>>
> There is such a thin
i like this idea (i posted some thoughts on it in the blog, but it's not
approved yet as of this writing)
in short, i suggested extending the idea to make it more a) generalized, b)
simple, c) intuitive, and d) flexible.
so instead of just using $ for attributes, you could use it anywhere you
def
1 - 100 of 254 matches
Mail list logo