| |
thread by: bearophileHUGS |
last post Sep 13 '08 by: Boris Borcic
Empty Python lists don't know the type of the items it will
contain, so this sounds strange:
0
Because that may be an empty sequence of someobject:
0
In a statically typed language in that situation you may answer the
|
thread by: sturlamolden |
last post Oct 5 '08 by: Lawrence D'Oliveiro
I have recently been playing with a kd-tree for solving the "post
office problem" in a 12-dimensional space. This is pure cpu bound
number crunching, a task for which I suspected Python to be
inefficient.
My prototype in Python 2.5 using NumPy required 0.41 seconds to
construct the tree from 50,000 samples. Unfortunately, searching it
felt...
|
thread by: Xah Lee |
last post Jul 19 '05 by: Xah Lee
What are OOP's Jargons and Complexities
Xah Lee, 20050128
The Rise of Classes, Methods, Objects
In computer languages, often a function definition looks like this:
subroutine f (x1, x2, ...) {
variables ...
do this or that
}
|
thread by: Paddy |
last post Sep 19 '05 by: Steven D'Aprano
A work colleague circulated this interesting article about reducing
software bugs by orders of magnitude:
http://www.spectrum.ieee.org/WEBONLY/publicfeature/sep05/0905ext.html
Some methods they talk about include removing error prone and ambiguous
expressions from their ADA based language Sparc - The example they give
is on why they removed...
|
thread by: richard |
last post Mar 18 '06 by: Christos Georgiou
So I wrote PyPI back a couple of years ago. It was just a simple cgi script
and some distutils code. I needed to call it *something* and "Python
Package Index" seemed like a fairly obvious name. Unfortunately, it's also
quite a mouthful. A friend suggested "PyPI" as a good shorter name. He also
indicated that it should be pronounced "Pippy"...
|
thread by: infidel |
last post Aug 10 '06 by: Stephen Kellett
Where are they-who-hate-us-for-our-whitespace? Are "they" really that
stupid/petty? Are "they" really out there at all? "They" almost sound
like a mythical caste of tasteless heathens that "we" have invented.
It just sounds like so much trivial nitpickery that it's hard to
believe it's as common as we've come to believe.
|
thread by: Omar |
last post Sep 16 '06 by: BartlebyScrivener
I'd love the perfect editor that would be:
a) free
b) enable me to drag and drop code snippets from a sort of browser into
the code
c) can run programs right from within
d) can edit
|
| |
thread by: John Howard |
last post Jul 18 '05 by: Michael Hudson
I've sent several messages over the last year asking about python -
Who teaches python? Is python losing steam? etc. I have noticed, eg,
the declinng number of books at my local borders. The last time I
visited a borders (last week), there was 1 (sic) book about python on
the shelve compared to dozens on perl & java! On my last inquiry about...
|
thread by: Egor Bolonev |
last post Jul 18 '05 by: Antoon Pardon
why functions created with lambda forms cannot contain statements?
how to get unnamed function with statements?
|
thread by: pinkfloydhomer |
last post Nov 22 '05 by: Antoon Pardon
Isn't there an easier way than
lst = ...
?
|
thread by: Chris Foote |
last post Jun 12 '06 by: Klaas
Hi all.
I have the need to store a large (10M) number of keys in a hash table,
based on a tuple of (long_integer, integer). The standard python
dictionary works well for small numbers of keys, but starts to
perform badly for me inserting roughly 5M keys:
# keys dictionary metakit (both using psyco)
------ ---------- -------
1M ...
|
thread by: Alan Isaac |
last post Jul 13 '07 by: ahlongxp
Is there any discussion of having real booleans
in Python 3000? Say something along the line
of the numpy implementation for arrays of type 'bool'?
Hoping the bool type will be fixed will be fixed,
Alan Isaac
|
thread by: dongie.agnir |
last post Jan 17 '08 by: Gary Duzan
I'm pretty new to Python, and even newer to Image/Video processing,
and trying to get started on a project similar to GRL Vienna's laser
marker. I found some sample code here http://janto.blogspot.com/2006/01/motion-capture-in-python.html,
but after running the code with the included sample input file, it
seems quite slow (1-2 seconds from...
|
thread by: Svein Ove Aas |
last post Jul 18 '05 by: Jacek Generowicz
Is anyone working on a python-to-native compiler?
I'd be interested in taking a look.
Come to think of it, is anyone working on a sexpr-enabled version of
Python, or anything similar? I really miss my macros whenever I try to
use it...
|
thread by: Raymond Hettinger |
last post Jul 18 '05 by: Stephen Horne
Please comment on the new PEP for reverse iteration methods.
Basically, the idea looks like this:
for i in xrange(10).iter_backwards(): # 9,8,7,6,5,4,3,2,1,0
<do something with i>
The HTML version is much more readable than the ReST version.
See:
http://www.python.org/peps/pep-0322.html
|
| |
thread by: Hugh Macdonald |
last post Jul 18 '05 by: greg
I've recently been trying out various different GUI frameworks in Python and
was wondering if I could get your input on the pros and cons of the
different ones...
wxPython: I love the programming side of wxPython, but I find it's just so
slow to initialise in the first place.
Tkinter: While it's fast to load up, the syntax has never...
|
thread by: seberino |
last post Aug 17 '05 by: Terry Reedy
I've heard 2 people complain that word 'global' is confusing.
Perhaps 'modulescope' or 'module' would be better?
Am I the first peope to have thought of this and suggested it?
Is this a candidate for Python 3000 yet?
Chris
|
thread by: Pierre Quentel |
last post Dec 16 '05 by: Grant Edwards
Hi all,
In some program I was testing if a variable was a boolean, with this
test : if v in
My script didn't work in some cases and I eventually found that for v =
0 the test returned True
So I changed my test for the obvious "if type(v) is bool", but I still
find it confusing that "0 in " returns True
|
thread by: Steve R. Hastings |
last post Apr 10 '06 by: Piet van Oostrum
So, Python 2.5 will have new any() and all() functions.
http://www.python.org/dev/peps/pep-0356/
any(seq) returns True if any value in seq evaluates true, False otherwise.
all(seq) returns True if all values in seq evaluate true, False otherwise.
I have a question: what should these functions return when seq is an empty
list?
|
thread by: psbasha |
last post Jan 10 '08 by: bvdet
Hi,
I am here with placing the Sample code for reading the and Input data mentioned.
Is there any best of reading the file?.
Thanks in advance
PSB
Sampple1.txt
Rect 1 1 2 7 6
|
thread by: Kevin Walzer |
last post Apr 25 '07 by: James Stroud
From the introduction to PyObjC, the Python-Objective-C bridge on Mac OS X:
"As described in Objective-C for PyObjC users the creation of
Objective-C objects is a two-stage process. To initialize objects, first
call a class method to allocate the memory (typically alloc), and then
call an initializer (typically starts with init). Some...
|
thread by: Py-Fun |
last post Oct 31 '07 by: Gabriel Genellina
I'm stuck trying to write a function that generates a factorial of a
number using iteration and not recursion. Any simple ideas would be
appreciated.
|
thread by: Sverker Nilsson |
last post Jun 27 '08 by: Nick Stinemates
do i dare to open a thread about this?
come on you braver men
we are at least not bought by g***le
but why? others have said it so many times i think
:-////
|
| |
thread by: aboxylica |
last post Jul 12 '07 by: aboxylica
my file is of the form
01 "\t" 10.19 "\t" 0.00 "\t" 10.65
02 "\t" 11.19 "\t" 10.12 "\t" 99.99
and i need to access the individual floating point numbers from it!
say for ex. the first no is 10.19.. i want to access this and add one to it.
...
|
thread by: km |
last post Sep 15 '05 by: Michael Sparks
Hi all,
is true parallelism possible in python ? or atleast in the coming versions ?
is global interpreter lock a bane in this context ?
regards,
KM
|