On Aug 12, 12:15 pm, Raymond Hettinger wrote:
> [Xah Lee]
>
> > i've wrote several articles about this issue, total time spend on this
> > is probably more than 2 months full-time work. See:
>
> > ⢠Python Documentation Problems
> > http://xahlee.org/perl-python/python_doc_index.html
>
> I just
["Followup-To:" header set to comp.lang.lisp.]
On 2009-08-17, Peter Keller wrote:
> In comp.lang.scheme Peter Keller wrote:
>> The distance() function in this new model is the centroid of the syntactic
>> datum which represent the semantic object.
>
> Oops.
>
> I meant to say:
>
> "The distance()
On Aug 17, 10:59 am, "l...@d@n" wrote:
> Which is the best GUI interface builder with drag and drop
> capabilities.
> I am using Ubuntu GNU/Linux.
> Please help me.
> Thank you.
There are many GUI builders for python. (Have to deal with the
licensing issues.)
Qt has a GUI builder.
Glade (GTK+) fo
Which is the best GUI interface builder with drag and drop
capabilities.
I am using Ubuntu GNU/Linux.
Please help me.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
In comp.lang.scheme Peter Keller wrote:
> The distance() function in this new model is the centroid of the syntactic
> datum which represent the semantic object.
Oops.
I meant to say:
"The distance() function in this new model uses the centroid of each
individual syntactic datum (which represen
Personally, particular interesting info i've learned is that, for all
my trouble in the past decade expressing problems of traditional math
notation, i learned from his article this single-phrase summary:
“traditional math notation lacks a grammar”.
The article is somewhat disappointing though. I
In comp.lang.scheme toby wrote:
> In my opinion Knuth believed in the value of literate programming for
> similar reasons: To try to exploit existing cognitive training. If
> your user base is familiar with English, or mathematical notation, or
> some other lexicography, try to exploit the pre-wir
btw, is there still info format for python doc?
i feel kinda sad that emacs info format has pretty much been
deprecated over the past decade. About a decade ago, you still will
see now and then people asking for emacs info format of docs (was the
days of perl). Today, one don't hear of it.
Part o
On Sun, 16 Aug 2009 03:19:51 -0700, sturlamolden wrote:
> Version 3.1 of wxFormBuilder can generate wxPython code. I have
> previously used wxFormBuilder to generate XRC files for my wxPython
> projects. Though still in beta, this might be even better. :-)
Is there a reason to prefer code over XR
On Sun, 16 Aug 2009 11:41:21 -0400, Benjamin Kaplan wrote:
> It's not that the code is bad, but too many people coming from Java
> and C keep thinking of for loops like they're using Java or C and
> therefore that "for i in range(a,b)" is identical to "for(int i = a; i
> < b; i++)". It's not and,
Thanks Raymond.
I've been out of python community for a couple of years. I've saved
your messages and will study it later when next time i work in python.
Possibly today and will reply in some of your points.
But just wanted to say thanks for improving python.
Also, sometimes ago out of the blue
w_a_x_man wrote:
> On Aug 16, 11:05 am, Petey Keller wrote:
>> Compiler go through *great* pains
>
> Compiler work real hard.
> Compiler have heap big trouble.
ROTFL. :-)
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u
--
http://mail.python.org/mailman/listin
On behalf of the Python development team, I'm happy to announce the first bugfix
release of the Python 3.1 series, Python 3.1.1.
This bug fix release fixes many normal bugs and several critical ones including
potential data corruption in the io library.
Python 3.1 focuses on the stabilization and
On Sun, 16 Aug 2009 05:05:01 +, Steven D'Aprano wrote:
> Now that I understand what the semantics of cout << "Hello world" are, I
> don't have any problem with it either. It is a bit weird, "Hello world"
> >> cout would probably be better,
Placing the stream on the LHS allows the main forms
On Aug 16, 3:35 pm, sturlamolden wrote:
> On 16 Aug, 14:57, Dennis Lee Bieber wrote:
>
> > Well, the alternative would be to have two keywords for looping: one
> > for your "simple" incrementing integer loop, and another for a loop that
> > operates over the elements of some collection ty
On Aug 16, 6:28 pm, exar...@twistedmatrix.com wrote:
> On 01:23 am, benjamin.kap...@case.edu wrote:
>
> >On Sun, Aug 16, 2009 at 6:35 PM, sturlamolden
> >wrote:
>
> >>A compiler could easily recognise a statement like
>
> >> for i in range(n):
>
> >>as a simple integer loop. In fact, Cython is ab
exar...@twistedmatrix.com writes:
> Although I think PyPy also recognizes this case and makes it as
> efficient as using xrange, and does so without breaking any rules.
How can pypy possibly know that the user hasn't assigned some other
value to "range"?
--
http://mail.python.org/mailman/listinfo
On 01:23 am, benjamin.kap...@case.edu wrote:
On Sun, Aug 16, 2009 at 6:35 PM, sturlamolden
wrote:
A compiler could easily recognise a statement like
� for i in range(n):
as a simple integer loop. In fact, Cython is able to do this.
but special cases aren't special enough to break the rules
On Aug 17, 8:35 am, sturlamolden wrote:
> A compiler could easily recognise a statement like
> for i in range(n):
> as a simple integer loop. In fact, Cython is able to do this.
Extremely easy, once users relinquish the right to replace built-in
"range" with their own concoctions ...
--
htt
On Sun, Aug 16, 2009 at 6:35 PM, sturlamolden wrote:
>
> A compiler could easily recognise a statement like
>
> for i in range(n):
>
> as a simple integer loop. In fact, Cython is able to do this.
but special cases aren't special enough to break the rules.
--
http://mail.python.org/mailman/lis
On 2009-08-16, Shailen wrote:
> Thanks Martin and Aahz. Anyone know if zip code information is
> copyrighted for the US?
You can't copyright "information" as such. Only concrete
expressions of information. A particular publication
containing zip code information can be copyrighted. The
underl
> It was a long time ago, I don't remember specifics, and the contents
> are surely out of date by now, but I extracted a bunch of the TIGER
> geographic coordinates for zip codes here:
>
> http://www.nightsong.com/phr/chess/zipcodes.zip
That file may have actually come from here:
http://www
Shailen writes:
> Thanks Martin and Aahz. Anyone know if zip code information is
> copyrighted for the US? Anyone can look up zip codes on usps.gov (and
> other locations),so the information is readily available. I need zip
> codes for a handful of cities and could map those myself (or write a
> s
On 16 Aug, 14:57, Dennis Lee Bieber wrote:
> Well, the alternative would be to have two keywords for looping: one
> for your "simple" incrementing integer loop, and another for a loop that
> operates over the elements of some collection type.
A compiler could easily recognise a statement
Thanks Martin and Aahz. Anyone know if zip code information is
copyrighted for the US? Anyone can look up zip codes on usps.gov (and
other locations),so the information is readily available. I need zip
codes for a handful of cities and could map those myself (or write a
script to scrape them for me
Dennis Lee Bieber wrote:
On Sat, 15 Aug 2009 23:14:39 -0600, John Haggerty
declaimed the following in gmane.comp.python.general:
I did detect one problem thus far
File "test.py", line 152
if len(args) == 1 and args[0] = "-c":
Should have been fine, unless my memory of s
In article <82c9f923-1098-4b7e-8f9d-9504c1a89...@12g2000pri.googlegroups.com>,
ArshaKrishna wrote:
>
>How can I resolve scope ambiguity using nltk toolkit with python
Question not clear, please provide more explanation
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.
On Aug 15, 7:55 am, Chris Withers wrote:
> Hi All,
>
> I thought this was fixed back in Python 2.5, but I guess not?
>
> So, I'm playing in an interactive session:
>
> >>> from xlrd import open_workbook
> >>> b = open_workbook('some.xls',pickleable=0,formatting_info=1)
>
> At this point, top sho
On Aug 16, 9:05 am, Peter Keller wrote:
> In comp.lang.scheme Xah Lee wrote:
>
> > Xah's Edu Corner: The importance of syntax & notations.
>
> >http://www.stephenwolfram.com/publications/recent/mathml/mathml_abstr...
>
> > this article should teach the coding sophomorons and computer
> > ?science
On Aug 16, 12:05 pm, Peter Keller wrote:
> In comp.lang.scheme Xah Lee wrote:
>
> > Xah's Edu Corner: The importance of syntax & notations.
>
> >http://www.stephenwolfram.com/publications/recent/mathml/mathml_abstr...
>
> > this article should teach the coding sophomorons and computer
> > ?scienc
Dennis Lee Bieber writes:
> > > No language can guard against independent access of a shared/global
> > > object by multiple threads...
> http://en.wikipedia.org/wiki/Erlang_(programming_language)
> """
> Like operating system processes (and unlike green threads and operating
> system threads) t
On 16 Aug, 11:45, "bartc" wrote:
> A for-loop, for iterating over a simple sequence, should be one of the
> fastest things in the language.
Anyone experienced with interpreted high-level languages knows this is
not true. Not because iterating a sequence is expensive, but because
the interpreter
On Sun, 16 Aug 2009 20:29:15 +, kj wrote:
> I'm looking for a XML parser that produces an object with full XPath
> support. What I've been using up to now, xml.etree.ElementTree, fails
> to support Xpath predicates, as in "sp...@eggs='3']/ham".
>
> What I'm trying to do is to read-in a large
kj schrieb:
I'm looking for a XML parser that produces an object with full
XPath support. What I've been using up to now, xml.etree.ElementTree,
fails to support Xpath predicates, as in "sp...@eggs='3']/ham".
What I'm trying to do is to read-in a large XML string, and parse
it into an object fr
I'm looking for a XML parser that produces an object with full
XPath support. What I've been using up to now, xml.etree.ElementTree,
fails to support Xpath predicates, as in "sp...@eggs='3']/ham".
What I'm trying to do is to read-in a large XML string, and parse
it into an object from which I c
bartc wrote:
"Steven D'Aprano" wrote in
message news:02969972$0$20647$c3e8...@news.astraweb.com...
On Fri, 14 Aug 2009 18:25:45 -0700, Dr. Phillip M. Feldman wrote:
It seems as though Python is actually expanding range(2,n) into a list
of numbers, even though this is incredibly wasteful of
On Aug 14, 8:22 pm, candide wrote:
> Suppose you need to split a string into substrings of a given size (except
> possibly the last substring). I make the hypothesis the first slice is at the
> end of the string.
> A typical example is provided by formatting a decimal string with thousands
> separ
In comp.lang.scheme w_a_x_man wrote:
> On Aug 16, 11:05?am, Petey Keller wrote:
>> Compiler go through *great* pains
>
> Compiler work real hard.
> Compiler have heap big trouble.
That's a funny observation in the context of this thread--which I
appreciate, since syntax really is the cornersto
On Aug 16, 6:18 am, Steven D'Aprano wrote:
> On Sun, 16 Aug 2009 01:41:41 -0700, Douglas Alan wrote:
> > I would definitely not like a language that obscures assignment by
> > moving it over to the right side of lines.
> One could argue that left-assigned-from-right assignment obscures the
> mo
John Haggerty wrote:
On Sat, Aug 15, 2009 at 7:23 PM, Dennis Lee Bieber wrote:
On Sat, 15 Aug 2009 14:34:36 -0600, John Haggerty
declaimed the following in gmane.comp.python.general:
What does the term "thread safe" mean exactly. I never had to program
with
"threads" be
And .splitlines seems to be able to handle all "standard" end-of-line
> markers without any special direction (which, ironically, strikes
> me as a *little* Perlish, somehow):
>
> >>> "spam\015\012ham\015eggs\012".splitlines(True)
> ['spam\r\n', 'ham\r', 'eggs\n']
>
... actually "working correctly
"Steven D'Aprano" wrote in message
news:02969972$0$20647$c3e8...@news.astraweb.com...
On Fri, 14 Aug 2009 18:25:45 -0700, Dr. Phillip M. Feldman wrote:
It seems as though Python is actually expanding range(2,n) into a list
of numbers, even though this is incredibly wasteful of memory. There
On Aug 16, 1:09 pm, kj wrote:
> And .splitlines seems to be able to handle all
> "standard" end-of-line markers without any special
> direction (which, ironically, strikes
> me as a *little* Perlish, somehow):
It's Pythonic. Universal newline-handling for text has been a staple
of Python for as
On Thu, Aug 13, 2009 at 11:16 PM, dou dou wrote:
> I have a function to do some thing like LEFT JOIN in SQL, the function use
> the itemgetter to get the "ON" and "SELECT" parameters of the two table(list
> of list), the problem is that itemgetter may return a value or a tuple of
> values, because
On Aug 16, 11:05 am, Petey Keller wrote:
> Compiler go through *great* pains
Compiler work real hard.
Compiler have heap big trouble.
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 16, 8:45 am, MRAB wrote:
> No, APL is strictly right-to-left.
>
> -> x
>
> means "goto x".
>
> Writing to the console is:
>
> [] <- myVar
>
> Reading from the console is:
>
> myVar <- []
Ah, thanks for the correction. It's been 5,000 years since I used APL!
|>ouglas
--
ht
Terry writes:
> Is there a simple way (the pythonic way) to flatten a list of list?
> rather than my current solution:
>
> new_list=[]
> for l in list_of_list:
> new_list.extend(l)
from itertools import chain
new_list = list(chain(list_of_list))
--
http://mail.python.org/mailman/listinfo/py
On 8/16/2009 5:47 AM Terry apparently wrote:
> Is there a simple way (the pythonic way) to flatten a list of list?
> rather than my current solution:
> new_list=[]
> for l in list_of_list:
> new_list.extend(l)
new_list = list(xi for lst in list_of_list for xi in lst)
hth,
Alan Isaac
--
h
> As far as releasing memory back to the OS is concerned, I have dim
> memories of *x systems where free() would return space to the OS if
> the block was "large" and it was next to the "break" point ... this
> effect could be what you are seeing.
Today, there are two cases when malloc returns mem
On Aug 16, 1:25 pm, Steven D'Aprano wrote:
...
> Chris' suggestion using itertools seems pretty good:
>
> >>> from timeit import Timer
> >>> setup = """\\
>
> ... L = [ [None]*5000 for _ in xrange(%d) ]
> ... from itertools import chain
> ... """>>> Timer("list(chain.from_iterable(L))", setup %
Kee Nethery wrote:
I've heard there is a nice add-on to Eclipse but Eclipse has even more
setup variables than Wings and I've avoided it for that reason.
Hi
I've just started using python and since I've been an eclipse user for
many years I tried http://pydev.sourceforge.net/ and I really e
In
ru...@yahoo.com writes:
>On Aug 14, 2:23=A0pm, kj wrote:
>> Sometimes I want to split a string into lines, preserving the
>> end-of-line markers. =A0In Perl this is really easy to do, by splitting
>> on the beginning-of-line anchor:
>>
>> =A0 @lines =3D split /^/, $string;
>>
>> But I can't
On Aug 16, 9:30 pm, paul wrote:
> Jaseem schrieb:> Hi,
>
> > Is python similar to actionscript 3.0
>
> Not really.
>
> > Which is better to create a rich gui internet application?
> > Is it AS 3.0 with flex or python with its GUI libs?
>
> Flex+AS3 definitely! (it's been designed for that, no surp
[Xavier Ho]
> > I've recently made my way to Python 3.1 and I'm not seeing __cmp__() in the
> > documentation.
>
> > Is there a substitution for this special method in 3.1, or do I really have
> > to define all six rich comparison methods to work it out?
FWIW, there is a recipe for expanding the c
Steven D'Aprano wrote:
On Sun, 16 Aug 2009 02:47:42 -0700, Terry wrote:
Is there a simple way (the pythonic way) to flatten a list of list?
Chris' suggestion using itertools seems pretty good:
from timeit import Timer
setup = """\\
... L = [ [None]*5000 for _ in xrange(%d) ]
... from itertoo
Jaseem schrieb:
Hi,
Is python similar to actionscript 3.0
Not really.
Which is better to create a rich gui internet application?
Is it AS 3.0 with flex or python with its GUI libs?
Flex+AS3 definitely! (it's been designed for that, no surprise here)
Is python in demand?
Depends. It seems
Dear Kev
Thank you very much.
I got it.:)
2009/8/16 Kev Dwyer
> On Sun, 16 Aug 2009 16:57:41 +0900, Chang Min Jeon wrote:
>
>
> Hello,
>
> You have placed recursive calls to the function in a number of different
> locations; when len(macro) becomes zero control will return to the
> calling func
In comp.lang.scheme Xah Lee wrote:
> Xah's Edu Corner: The importance of syntax & notations.
>
> http://www.stephenwolfram.com/publications/recent/mathml/mathml_abstract.html
>
> this article should teach the coding sophomorons and computer
> ?science? idiotic authors who harbor the notion that
On Sun, Aug 16, 2009 at 2:30 AM, Emmanuel Surleau
wrote:
>
> I don't see what's particularly un-Pythonic with this code. Not using xrange()
> is a mistake, certainly, but it remains clear, easily understandable code
> which correctly demonstrates the naive algorithm for detecting whether n is a
>
This is strange because I actually had "if exists" in my code:
sqlKWDrop = 'DROP TABLE IF EXISTS ' + kwTable + ';'
where kwTable, in the instance cited below, becomes "judaism_128". What
gives?
Victor
On Sun, Aug 9, 2009 at 7:57 PM, Dennis Lee Bieber wrote:
> On Sun, 9 Aug 2009 15:21:43 -0500,
Christian Heimes a écrit :
Jean-Michel Pichavant wrote:
scott.dani...@acm.org
That could do the trick, sparing me from writing additional code in
each methods. Thanks.
Why are you trying to reinvent the wheel? Python's abc module already
takes care of these details.
Christian
I'm working w
Christian Heimes wrote:
Jean-Michel Pichavant wrote:
talking about approaches:
1/
class Interface:
def foo(self):
if self.__class__.foo == Interface.foo:
raise NotImplementedError
2/
class Interface:
def foo(self):
self._foo()
def _foo(sef):
raise No
Jean-Michel Pichavant wrote:
scott.dani...@acm.org
That could do the trick, sparing me from writing additional code in each
methods. Thanks.
Why are you trying to reinvent the wheel? Python's abc module already
takes care of these details.
Christian
--
http://mail.python.org/mailman/listinf
On 2009-08-15, Hendrik van Rooyen wrote:
> On Saturday 15 August 2009 16:25:03 Grant Edwards wrote:
>
>> Are you using python file operations open/read/write or OS
>> file-descriptor operations os.open/os.read/os.write?
>
> The former - that seems to be the source of my trouble.
>
> I have now wri
Scott David Daniels wrote:
Jean-Michel Pichavant wrote:
Steven D'Aprano wrote:
On Fri, 14 Aug 2009 18:49:26 +0200, Jean-Michel Pichavant wrote:
Sorry guys (means guys *and* gals :op ), I realized I've not been able
to describe precisely what I want to do. I'd like the base class to be
virtu
> It's a particular unfair criticism because the critic (Ethan Furman)
> appears to have made a knee-jerk reaction. The "some language in Python"
> behaviour he's reacting to is the common idiom:
>
> for i in range(len(seq)):
> do_something_with(seq[i])
>
>
> instead of the "Python in Python" i
On Sun, 16 Aug 2009 16:57:41 +0900, Chang Min Jeon wrote:
Hello,
You have placed recursive calls to the function in a number of different
locations; when len(macro) becomes zero control will return to the
calling function, but this calling function may have more code to
execute, including fur
John:
Well, this is actually a script which wraps around another application. :-)
My goal is when I introduce a new feature I don't want to break old
stuff so instead of me testing manually I want to build a framework of
tests.
On Sat, Aug 15, 2009 at 11:37 PM, John Haggerty wrote:
> This is an
Douglas Alan wrote:
[snip]
C++ also allows for reading from stdin like so:
cin >> myVar;
I think the direction of the arrows probably derives from languages
like APL, which had notation something like so:
myVar <- 3
[] <- myVar
"<-" was really a little arrow symbol (APL didn't us
Xavier Ho wrote:
On Sun, Aug 16, 2009 at 9:49 PM, Mark Lawrence wrote:
Unfortunately I don't think it's that easy, see.
http://mail.python.org/pipermail/python-list/2008-November/688761.html
The issue referenced is still open. This of course assumes that I've
posted the correct link this time!
Chris Rebert:
> The OP asked for "simple", not "best", "most proper", or "fastest". My
> comment was intended to mean that the code was marginally *simpler*,
> not faster.
Yep, the OP has asked for simple code. But often this is not the right
way to solve this situation. A better way is to create
i've just had to put something together for pyjamas-desktop which may
prove to be useful to other people, so i'm pointing people in its
general direction, for archive purposes.
the purpose behind the platform override system is to allow
implementations of a common API, in python, to share the majo
On Sun, Aug 16, 2009 at 9:49 PM, Mark Lawrence wrote:
>
> Unfortunately I don't think it's that easy, see.
> http://mail.python.org/pipermail/python-list/2008-November/688761.html
> The issue referenced is still open. This of course assumes that I've
> posted the correct link this time!
>
I'm no
Chris Rebert wrote:
On Sat, Aug 15, 2009 at 8:09 AM, Xavier Ho wrote:
Hey all,
I've recently made my way to Python 3.1 and I'm not seeing __cmp__() in the
documentation.
Is there a substitution for this special method in 3.1, or do I really have
to define all six rich comparison methods to wor
On Sun, Aug 16, 2009 at 7:31 AM, Steven
D'Aprano wrote:
> On Sun, 16 Aug 2009 06:59:52 -0400, Chris Rebert wrote:
>>> Surely that's going to be O(N**2)?
>>
>> The OP asked for "simple", not "best", "most proper", or "fastest". My
>> comment was intended to mean that the code was marginally *simpler
Xavier Ho wrote:
I'm really looking for a way to set up Python classes' natural ordering
for sorting purposes.
I believe __lt__ (<) is the only method (operator) used by both .sort
and heap module.
--
http://mail.python.org/mailman/listinfo/python-list
On Sunday 16 August 2009 12:18:11 Steven D'Aprano wrote:
> In any case, after half a century of left-from-right assignment, I think
> it's worth the experiment in a teaching language or three to try it the
> other way. The closest to this I know of is the family of languages
> derived from Apple's
On Sun, 16 Aug 2009 06:59:52 -0400, Chris Rebert wrote:
>> Surely that's going to be O(N**2)?
>
> The OP asked for "simple", not "best", "most proper", or "fastest". My
> comment was intended to mean that the code was marginally *simpler*, not
> faster.
Fair enough, but he also asked for Pythoni
On Sun, 16 Aug 2009 02:47:42 -0700, Terry wrote:
> Hi,
>
> Is there a simple way (the pythonic way) to flatten a list of list?
> rather than my current solution:
>
> new_list=[]
> for l in list_of_list:
> new_list.extend(l)
I don't think that scales terribly well. In my testing, it performs
On Aug 16, 6:59 pm, Chris Rebert wrote:
> On Sun, Aug 16, 2009 at 6:49 AM, Steven
>
>
>
>
>
> D'Aprano wrote:
> > On Sun, 16 Aug 2009 05:55:48 -0400, Chris Rebert wrote:
> >> On Sun, Aug 16, 2009 at 5:47 AM, Terry wrote:
> >>> Hi,
>
> >>> Is there a simple way (the pythonic way) to flatten a list
On Aug 11, 1:17 pm, John Machin wrote:
> On Aug 10, 9:26 pm, joy99 wrote:
>
> > Dear Group,
>
> > I am using Python26 on WindowsXP with service pack2. My GUI is IDLE.
> > I am using Hindi resources and get nice output like:
> > एक
> > where I can use all the re functions and other functions witho
On Sunday 16 August 2009 08:20:34 John Nagle wrote:
> Hendrik van Rooyen wrote:
> > On Saturday 15 August 2009 14:40:35 Michael Ströder wrote:
> >> Hendrik van Rooyen wrote:
> >>> In the past, on this group, I have made statements that said that on
> >>> Linux, the serial port handling somehow doe
On Sun, 16 Aug 2009 12:03:53 +0200, Michael Fötsch wrote:
> Terry wrote:
>> Is there a simple way (the pythonic way) to flatten a list of list?
>
> This is probably the shortest it can get:
>
> sum(list_of_lists, [])
That's also O(N**2).
>>> from timeit import Timer
>>> setup = "L = [ ([None
On Sun, Aug 16, 2009 at 6:49 AM, Steven
D'Aprano wrote:
> On Sun, 16 Aug 2009 05:55:48 -0400, Chris Rebert wrote:
>> On Sun, Aug 16, 2009 at 5:47 AM, Terry wrote:
>>> Hi,
>>>
>>> Is there a simple way (the pythonic way) to flatten a list of list?
>>> rather than my current solution:
>>>
>>> new_lis
On Sun, 16 Aug 2009 05:55:48 -0400, Chris Rebert wrote:
> On Sun, Aug 16, 2009 at 5:47 AM, Terry wrote:
>> Hi,
>>
>> Is there a simple way (the pythonic way) to flatten a list of list?
>> rather than my current solution:
>>
>> new_list=[]
>> for l in list_of_list:
>> new_list.extend(l)
>>
>> or
Chris Rebert schrieb:
On Sun, Aug 16, 2009 at 6:25 AM, Johannes
Janssen wrote:
Gabriel Genellina schrieb:
The try/except around sys._getframe(1) is because that function is not
mandatory/available on all Python implementations (that's the case for
jython which doesn't provide it).
On Sun, Aug 16, 2009 at 6:25 AM, Johannes
Janssen wrote:
> Gabriel Genellina schrieb:
>>
>> The try/except around sys._getframe(1) is because that function is not
>> mandatory/available on all Python implementations (that's the case for
>> jython which doesn't provide it).
>
> Thanks, shouldn't suc
Gabriel Genellina schrieb:
The try/except around sys._getframe(1) is because that function is not
mandatory/available on all Python implementations (that's the case for
jython which doesn't provide it).
Thanks, shouldn't such information be part of the python documentation
of sys._getframe()
Version 3.1 of wxFormBuilder can generate wxPython code. I have
previously used wxFormBuilder to generate XRC files for my wxPython
projects. Though still in beta, this might be even better. :-)
http://wxformbuilder.org/
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 16 Aug 2009 01:41:41 -0700, Douglas Alan wrote:
> I like to be able to read everything from left to right, and Lisp does
> that more than any other programming language.
>
> I would definitely not like a language that obscures assignment by
> moving it over to the right side of lines.
On
Terry wrote:
Is there a simple way (the pythonic way) to flatten a list of list?
This is probably the shortest it can get:
sum(list_of_lists, [])
Kind Regards,
M.F.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Aug 16, 2009 at 5:47 AM, Terry wrote:
> Hi,
>
> Is there a simple way (the pythonic way) to flatten a list of list?
> rather than my current solution:
>
> new_list=[]
> for l in list_of_list:
> new_list.extend(l)
>
> or,
>
> new_list=reduce(lambda x,y:x.extend(y), list_of_list)
#only ma
Mark Tolonen schrieb:
"Gregor Lingl" wrote in message
news:4a87036a$0$2292$91cee...@newsreader02.highway.telekom.at...
Emile van Sebille schrieb:
On 8/14/2009 5:22 PM candide said...
...
What is the pythonic way to do this ?
I like list comps...
>>> jj = '1234567890123456789'
>>> ",".
Hi,
Is there a simple way (the pythonic way) to flatten a list of list?
rather than my current solution:
new_list=[]
for l in list_of_list:
new_list.extend(l)
or,
new_list=reduce(lambda x,y:x.extend(y), list_of_list)
br, Terry
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Aug 16, 2009 at 7:38 PM, Mark Lawrence wrote:
>
> Blast, I posted the wrong flaming link, sorry everybody.
>
No, don't be sorry. I found your link very informative, and while it's a
little mixed, it could be useful.
I'm really looking for a way to set up Python classes' natural ordering
On Aug 16, 5:25 pm, Duncan Booth wrote:
> Ben Finney wrote:
> > Terry writes:
>
> >> It seemed the to me that python unittest module does not support the
> >> counting of ignored test cases directly. Is there any ready solution
> >> for this?
>
> > One solution I've seen involves:
>
> > * a cust
Chris Rebert wrote:
On Sat, Aug 15, 2009 at 1:06 PM, Mark Lawrence wrote:
Xavier Ho wrote:
Hey all,
I've recently made my way to Python 3.1 and I'm not seeing __cmp__() in
the
documentation.
Is there a substitution for this special method in 3.1, or do I really
have
to define all six rich com
On Aug 16, 4:48 am, Erik Max Francis wrote:
> Douglas Alan wrote:
> > Personally, my favorite is Lisp, which looks like
>
> > (set! y (+ y 1))
>
> For varying values of "Lisp." `set!` is Scheme.
Yes, I'm well aware!
There are probably as many different dialects of Lisp as all other
programmi
Ben Finney wrote:
> Terry writes:
>
>> It seemed the to me that python unittest module does not support the
>> counting of ignored test cases directly. Is there any ready solution
>> for this?
>
> One solution I've seen involves:
>
> * a custom exception class, âTestSkippedâ
>
> * raisin
Douglas Alan wrote:
Personally, my favorite is Lisp, which looks like
(set! y (+ y 1))
For varying values of "Lisp." `set!` is Scheme.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Get there
1 - 100 of 109 matches
Mail list logo