I have a few simple questions regarding python style standards. I have a
class contained in a module...I'm wondering if I should perform any imports
that are relevant to the class within the constructor of the class or at the
top of the module page.
Also if I'm creating a docstring for the class I
the same way...
Ok problem resolved.
Grazie tanto ;-)
David
On Fri, Oct 3, 2008 at 12:08 AM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 2, 2008 at 8:07 PM, David Di Biase <[EMAIL PROTECTED]>
> wrote:
> > Hi there,
> >
> > I'm sorting an expansive li
Hi there,
I'm sorting an expansive list descending according to a list of tuples.
Basically it has to sort the last value in the tuple (3) but if they are the
same then it should resort to using the second last value (2). Now according
to my very limited testing I've somewhat figured out that this
Yeah,
Apologies, it's been a long day for me. It works, just have to check if the
nazis I'm doing this for will allow me to use object and NumPy. ack.
Thanks again,
Dave
On Fri, Sep 26, 2008 at 2:08 PM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 26, 2008 at 7:22
12:42 AM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 25, 2008 at 8:57 PM, David Di Biase <[EMAIL PROTECTED]>
> wrote:
> > I have a list with about 1000-1500 sub-lists which look like so:
> > list[-0.28817955213290786, 3.6693631467403929, 'H', 31.3
I have a list with about 1000-1500 sub-lists which look like so:
list[-0.28817955213290786, 3.6693631467403929, 'H', 31.31225233035784]]
The first and second values are Angstrom units specifying the location of a
particle. What I'd like to do is determine the distance between the smallest
and larg
When you say slightly, is it enough to make a difference? Why would
getitems be faster even - not sure I can think why...
Sent from my iPhone
On 24-Sep-08, at 5:46 PM, Matt Nordhoff <[EMAIL PROTECTED]>
wrote:
Chris Rebert wrote:
On Wed, Sep 24, 2008 at 2:02 PM, David Di Biase &
Hi,
I have a rather large list structure with tuples contained in them (it's
part of a specification I received) looks like so:
[(x1,y1,r1,d1),(x2,y2,r2,d2)...]
The list can range from about 800-1500 tuples in size and I'm currently
sorting it with this:
a_list.sort(lambda a, b: cmp(b[3], a[3]))