Re: how to use "heapq" module as a max-heap?

2009-03-29 Thread Paddy3118
On Mar 29, 8:36 am, "Apollo" wrote: > as we all known, in the standard module 'heapq',  we can easily get the > smallest item from the heap. i.e. it's an implementation of min-heap. > >  my question is how to use 'heapq' to extract the biggest item from the heap? >  is it possible? > >  thanks  

Re: Does Python have certificate?

2009-03-24 Thread Paddy3118
On Mar 24, 1:50 am, Johannes Bauer wrote: > Sebastian Bassi schrieb: > > > No, there is no certification for Python. Maybe in the future... > > I'll hand out the "Johannes Bauer Python Certificate of Total > Awesomeness" for anyone who can write a hello world in python and hands > me $25000 in cas

Re: equivalent of source command in tcl for python

2009-03-18 Thread Paddy3118
On Mar 19, 4:42 am, Ralf Schoenian wrote: > mark.coll...@csiro.au wrote: > > Many times I am developing a code in a file and I want to, for > > example, exit at a specific line so that I can test something. In tcl > > you can just put an exit command in and source the file. Is there an > > equival

Re: datetime.time and midnight

2009-02-21 Thread Paddy3118
On Feb 21, 10:44 pm, Ethan Furman wrote: > Greetings, List! > > I was curious if anyone knew the rationale behind making midnight False? > > --> import datetime > --> midnight = datetime.time(0,0,0) > --> bool(midnight) > False > > To my way of thinking, midnight does actually exist so it should b

Re: VIM: Python type indented-block command equivalent to % for C?

2007-03-08 Thread Paddy3118
On Mar 8, 5:02 am, "Paddy3118" <[EMAIL PROTECTED]> wrote: > Not python: > but python type > indented text > > Notice the blank line above. > It could have several > spaces or tabs, and still > be a part of the block > beginni

VIM: Python type indented-block command equivalent to % for C?

2007-03-07 Thread Paddy3118
Not python: but python type indented text Notice the blank line above. It could have several spaces or tabs, and still be a part of the block beginning 'Not python:': The block ends at the first non-blank line with less indent. Assuming that only s

Anyone persuaded by "merits of Lisp vs Python"?

2006-12-28 Thread Paddy3118
This month there was/is a 1000+ long thread called: "merits of Lisp vs Python" In comp.lang.lisp. If you followed even parts of the thread, AND previously used only one of the languages AND (and this is the crucial bit), were persuaded to have a more positive view of the other language; (deep bre

Lisp additions to Docstring Wikipedia entry?

2006-11-11 Thread paddy3118
Hello, I have just expanded the Wikipedia stub article on docstrings at http://en.wikipedia.org/wiki/Docstring. Unfortunately I do not know about Lisp, but took the time to google and found a link to the GNU Emacs Lisp entry: documentation at: http://ftp.gnu.org/gnu/Manuals/elisp-manual-20-2.5/html

Re: combining several lambda equations

2005-02-18 Thread paddy3118
Fredrik Lundh wrote: > Paddy McCarthy wrote: > > > #If given:two or more lambda equations > > x=lambda : A < B > > y=lambda : C+6 >= 7 > > > > How do I create another lambda expression Z equivalent to > > > > Z=lambda : (A=7) > > > > # i.e. the anding together of the originals, but without referenc