On Sat, 07 May 2011 21:21:45 +1200, Gregory Ewing
wrote:
: You can manipulate them just fine by moving them
: from one place to another:
:
: a = b
:
: You can use them to get at stuff they refer to:
:
: a = b.c
: a[:] = b[:]
Surely you can refer to the objects, but you cann
I had this happening to me as well someday.
I recall that first installing it (python setup.py install), and then
rerunning selftest, solved that error.
I tried that as well.
Here is the summary of the install process:
build/temp.linux-x86_64-2.4/libImaging/ZipEncode.o -L/usr/local/lib
-L/usr/
harrismh777 wrote:
> [...] because *any* time or *most* types
> can be substituted and the 'polymorphism' of Python kicks in allowing
> for that [...]
The same benefit one might get from using the idiomatic 'if not
list:'?
;)
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, May 9, 2011 at 2:34 PM, Ian Kelly wrote:
> "bool(list)" describes whether the list contains something. "Not"
> being a logical operator, it stands to reason that "not list" should
> mean the same thing as "not bool(list)". Anything else would be
> surprising and pointlessly convoluted.
On 09/05/11 13:31, James Mills wrote:
On Mon, May 9, 2011 at 1:23 PM, Chris Angelico wrote:
Just learning python.
I can see that I can address an individual element of a list of lists by
doing something like:
row = list[5]
element = row[3]
This is the correct approach.
Here's an interactive
On Apr 16, 5:20 am, Alec Taylor wrote:
> Good Afternoon,
>
> I'm looking for an IDE which offers syntax-highlighting,
> code-completion, tabs, an embedded interpreter and which is portable
> (for running from USB on Windows).
>
> Here's a mockup of the app I'm looking for:http://i52.tinypic.com/2u
On Sun, May 8, 2011 at 9:33 PM, harrismh777 wrote:
> Why should the negation of a list imply that the list empty? ... nor any
> other abstract condition which is not well suited to 'not' ? (forget python
> for a moment... then move on to my argument...)
>
> What made the python development te
Steven D'Aprano wrote:
Python is the new kid on the block,
Nonsense. Python is 20 years old (1991), which makes it older than:
Java, PHP, Ruby (1995)
Javascript (1996)
C# (2000)
Visual Basic .Net (2001)
Python is the new kid on the block.
... not chronologically perhaps, but measured
Steven D'Aprano wrote:
which is irony extreme since 'not' is typically considered a logical
> operator.
Because "not" is typically used as a logical operator.
In English, it negates a word or statement:
"the cat is not on the mat" --> "the cat is on the mat" is false.
Your pedantic bogu
On Mon, May 9, 2011 at 1:23 PM, Chris Angelico wrote:
>> Just learning python.
>> I can see that I can address an individual element of a list of lists by
>> doing something like:
>> row = list[5]
>> element = row[3]
This is the correct approach.
Here's an interactive example (tested):
$ python
On 05/08/2011 05:36 PM, Dan Stromberg wrote:
> Just what is an inductive algorithm?
>From what I can remember, it's just an implementation of a proof
essentially. Any algorithm that can be inductively proven can be
implemented with recursion and specific base cases. In other words you
program ju
On Mon, May 9, 2011 at 1:15 PM, Chris Roy-Smith
wrote:
> Just learning python.
> I can see that I can address an individual element of a list of lists by
> doing something like:
> row = list[5]
> element = row[3]
>
> But is there a way to directly address an entry in a single statement?
Yep!
ele
Just learning python.
I can see that I can address an individual element of a list of lists by
doing something like:
row = list[5]
element = row[3]
But is there a way to directly address an entry in a single statement?
Thanks for any help.
Regards
Chris Roy-Smith
--
http://mail.python.org/mailm
Teemu Likonen writes:
> * 2011-05-08T12:59:02Z * Steven D'Aprano wrote:
>
>> On Sun, 08 May 2011 01:44:13 -0400, Robert Brown wrote:
>>> Python requires me to rewrite the slow bits of my program in C to get
>>> good performance.
>>
>> Python doesn't require you to re-write anything in C. If you w
On Mon, May 9, 2011 at 2:34 AM, Teemu Likonen wrote:
> But of course "development time" is a nicely vague concept. Depending on
> the argument it can include just the features of language and
> implementation. Other times it could include all the available resources
> such as documentation, librar
payment wholesale SHOES(UGG BOOTS, Timberland boots ,Munich
shoes,NIKE,ADIDAS,LV,GUCCI,CHANEL,PRADA,POLO,D&G,DIOR AND SO ON) www
dot 51-wholesale dot
com
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
Since you haven't explained what you think is happening, I can only
guess.
Let me save you from guessing. I'm thinking of a piece of paper with
a little box on it and the name 'a' written beside it. There is an
arrow from that box to a bigger box.
On Sun, May 8, 2011 at 3:41 PM, Terry Reedy wrote:
> On 5/8/2011 10:07 AM, Steven D'Aprano wrote:
>
> Because the test of "is this nothing, or something?" is a common, useful
>> test:
>>
>
> Because inductive algorithms commonly branch on 'input is something' (not
> done, change args toward 'not
On 5/8/2011 6:44 AM, pb wrote:
Hi,
I', having trouble with scipy.
If you do not get an answer here, try the scipy list where scipy experts
hang out. You might also try searching the archives of that list or the
scipy bug tracker.
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinf
On 5/8/2011 10:07 AM, Steven D'Aprano wrote:
Because the test of "is this nothing, or something?" is a common, useful
test:
Because inductive algorithms commonly branch on 'input is something'
(not done, change args toward 'nothing'and recurse or iterate) versus
'input is nothing (done, retu
Hans Mulder writes:
> How about:
> changes = filter(is_bad, d)
> Or would that be too compact?
I thought of writing something like that but filter in python 3 creates
an iterator that would have the same issue of walking the dictionary
while the dictionary is mutating.
changes = list(f
On 08/05/2011 00:12, Roy Smith wrote:
In article<7xd3jukyn9@ruckus.brouhaha.com>,
Paul Rubin wrote:
Roy Smith writes:
changes = [ ]
for key in d.iterkeys():
if is_bad(key):
changes.append(key)
changes = list(k for k in d if is_bad(k))
is a little bit more direct.
This
On May 8, 2011 2:00pm, Dan Stromberg wrote:
On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom gslindst...@gmail.com>
wrote:
Is it possible to create a dictionary from a string value? Something
along these lines (but that works):
>>> mystring = "{'name':'greg','hatsize':'7 5/8'}"
>>> mystri
On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom wrote:
> Is it possible to create a dictionary from a string value? Something along
> these lines (but that works):
>
> >>> mystring = "{'name':'greg','hatsize':'7 5/8'}"
> >>> mystring
> "{'name':'greg','hatsize':'7 5/8'}"
> >>> dict(mystring)
> Tra
On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom wrote:
> Is it possible to create a dictionary from a string value? Something along
> these lines (but that works):
>
mystring = "{'name':'greg','hatsize':'7 5/8'}"
mystring
> "{'name':'greg','hatsize':'7 5/8'}"
dict(mystring)
> Traceb
* 2011-05-08T12:59:02Z * Steven D'Aprano wrote:
> On Sun, 08 May 2011 01:44:13 -0400, Robert Brown wrote:
>> I don't understand why you place Lisp and Forth in the same category
>> as Pascal, C, and Java. Lisp and Forth generally have highly
>> interactive development environments, while the other
On Mon, May 9, 2011 at 1:20 AM, Greg Lindstrom wrote:
> Is it possible to create a dictionary from a string value? Something along
> these lines (but that works):
>
mystring = "{'name':'greg','hatsize':'7 5/8'}"
mystring
> "{'name':'greg','hatsize':'7 5/8'}"
dict(mystring)
> Traceb
Steven D'Aprano writes:
> Lisp uses the empty list and the special atom NIL as false values,
> any other s-expression is true. Scheme is different: it defines a
> special false atom, and empty lists are considered true. In Ruby,
I'll inject a pedantic note: there is only one false value in both
L
Is it possible to create a dictionary from a string value? Something along
these lines (but that works):
>>> mystring = "{'name':'greg','hatsize':'7 5/8'}"
>>> mystring
"{'name':'greg','hatsize':'7 5/8'}"
>>> dict(mystring)
Traceback (most recent call last):
File "", line 1, in
ValueError: dic
On Sat, 07 May 2011 22:50:55 -0500, harrismh777 wrote:
> Steven D'Aprano wrote:
>>> > and implies in any case that li does not exist
>> It does nothing of the sort. If li doesn't exist, you get a NameError.
>
> That was the point. 'not' implies something that is not logical;
I'm afraid
In article
<58a6bb1b-a98e-4c4a-86ea-09e040cb2...@r35g2000prj.googlegroups.com>,
snorble wrote:
> [standard tale of chaotic software development elided]
>
> I am aware of tools like version control systems, bug trackers, and
> things like these, but I'm not really sure if I need them, or how to
On May 3, 12:15 pm, rnd wrote:
> On May 2, 10:48 pm, John Henry wrote:
>
> > Attempt to push Pythoncard to a 1.0 status is now underway. A
> > temporary website has been created at:
>
> >http://code.google.com/p/pythoncard-1-0/
>
> > The official website continues to behttp://pythoncard.sourcefo
On Sun, 08 May 2011 01:44:13 -0400, Robert Brown wrote:
> Steven D'Aprano writes:
>> If you value runtime efficiency over development time, sure. There are
>> plenty of languages which have made that decision: Pascal, C, Java,
>> Lisp, Forth, and many more.
>
> I don't understand why you place L
On May 8, 12:21 pm, TheSaint wrote:
> First I didn't espect to see much more than my message. I agree that I'm
> very new to the module
You could do
logging.basicConfig(level=logging.DEBUG, format='%(message)s')
to get just the message.
> Second the will terminator appear only to real stdout
Pydev for eclipse/aptana
On Saturday, May 7, 2011, emato wrote:
>
>> On Apr 16, 1:20 pm, Alec Taylor wrote:
>>
>>> I'm looking for an IDE which offers syntax-highlighting,
>>> code-completion, tabs,
>
> gedit
>
> http://projects.gnome.org/gedit/index.html
>
>
> --
> http://mail.python.org/mailma
Vinay Sajip wrote:
8<
> For Python 3.2 and later, it's the terminator attribute of the
> StreamHandler. See:
8<
> Unfortunately, for earlier Python versions, you'd need to subclass and
> override StreamHandler.emit() to get equivalent functionality :-(
>
I'm with 3.2 and willing to stay :)
I was
Hi,
I', having trouble with scipy. I have followed the instructions at
scipy website and have installed the following on my mac osx 10.6.6
NumPy version 1.5.1
NumPy is installed in /Library/Frameworks/Python.framework/Versions/
2.6/lib/python2.6/site-packages/numpy
SciPy version 0.8.0
SciPy is in
On May 8, 7:15 am, TheSaint wrote:
> OK, my analysis led me to the print() function, which would suffice for
> initial my purposes.
The logging HOWTO tells you when to use logging, warnings and print():
http://docs.python.org/howto/logging.html
> Meanwhile I reading the tutorials, but I couldn
Am 07.05.2011 11:09, schrieb Gregory Ewing:
Ethan Furman wrote:
Ian Kelly wrote:
next(iter(myDict.items()))
Which is becoming less elegant.
If you're doing this sort of thing a lot you can make
a little helper function:
def first(x):
return next(iter(x))
then you get to say
first(myDict
http://bugs.python.org/issue12029
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 26, 7:39 pm, snorble wrote:
> I'm not a Pythonista, but I aspire to be.
>
> My current tools:
>
> Python, gvim, OS file system
>
> My current practices:
>
> When I write a Python app, I have several unorganized scripts in a
> directory (usually with several named test1.py, test2.py, etc., f
41 matches
Mail list logo