CSUIDL PROGRAMMEr [EMAIL PROTECTED]:
folks I have two lists
i am trying to loop thorough them simultenously.
Is there any efficient doing this
Try the built-in function zip.
zip(['a', 'b', 'c'], [1, 2, 3])
[('a', 1), ('b', 2), ('c', 3)]
--
Björn Lindström [EMAIL PROTECTED]
Student
the
intention clearer.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
Felipe Almeida Lessa [EMAIL PROTECTED]:
In the case of Python, as well as Java, the language has the same
name as the framework, and this may have lead you to mistake me.
Not really, in either case. There's Python for both .NET and for the
Java VM.
--
Björn Lindström [EMAIL PROTECTED
. The FSF
standpoint is that if you link to a library, you are creating a
derivative of that library, in the shape of the whole process.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
should be used to obtain the desired output?
How about this?
numbers = [1, 2, 3]
print [x * 2 for x in numbers]
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
with that is that a few people would prefer to use this all
the time, damaging the (almost) uniform indentation among Python
programs.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin http://[EMAIL PROTECTED] writes:
[EMAIL PROTECTED] (Björn Lindström) writes:
Actually using tabs for eight spaces and then filling out with spaces to
the correct indentation is the convention for Emacs Lisp. Of course,
since everyone coding Emacs Lisp does it with the same editor
are trying to pick only one, which one causes fewer problems.
Actually using tabs for eight spaces and then filling out with spaces to
the correct indentation is the convention for Emacs Lisp. Of course,
since everyone coding Emacs Lisp does it with the same editor, it's no
problem.
--
Björn Lindström
should explain it:
http://www.jwz.org/doc/tabs-vs-spaces.html
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
only for side
effects. (Similar to a void function in C.)
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
, I think you're confusing the (in Python pretty
non-existent) concept of encapsulation with Python's immutable types,
which are immutable because the implementation demands it. (A fact I
hope will disappear at some point.)
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics
the back way.
Anyway, as he doesn't mention anything about using this immutability for
any kind of optimisation, I assume it's about Control.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
open(self):
self.state = opened
def close(self):
self.state = closed
So, I guess no one read my explanation of why this an issue about more
than implementing enums (which is fairly trivial, as we have seen).
--
Björn Lindström [EMAIL PROTECTED]
Student of computational
, but I
don't think that would be strictly necessary.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
symbols, to me.
I don't see why Python doesn't go all the way and add a real symbol
type, though. I've seen way too many ugly string or integer based
solutions.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman
Sargun Dhillon [EMAIL PROTECTED] writes:
Me and my friends are working on a project, Circe we'd like some people
to test it:
I guess you weren't aware of this.
http://www.emacswiki.org/cgi-bin/wiki/Circe
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala
it, and have found
it perfectly readable up to now.
Actually it does set some fonts (avantgarde and
lucidasomethignorother) as first choices. I guess you, like me, and
probably most people in here, doesn't have those installed.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational
, but if you mean
it should be human readable, maybe the csv module is the thing.
http://docs.python.org/lib/module-csv.html
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
)
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
')
Is that possible? And how to do that?
Check out the commands module.
http://docs.python.org/lib/module-commands.html
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
Pythonic IDE
extravaganza, I'm sure people will download it, whether or not they can
do it on python.org.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin http://[EMAIL PROTECTED] writes:
[EMAIL PROTECTED] (Björn Lindström) writes:
I don't see why the things you talk about would have to be part of the
main Python distribution. Ruby on Rails seems to do pretty well without
being included with the core language.
I haven't used Ruby
.
Plonk.
Yeah, thanks, that's the word.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
concurrency easier.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
, list):
for f in flatten(e):
yield f
else:
yield e
for x in flatten([0, [1, 2, [3, 4], 5], 6, 7]):
whatever()
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman
://www.artima.com/weblogs/viewpost.jsp?thread=98196
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
to create the GUI.
Of course, you can do that with Python, too, with Glade
(http://www.jamesh.id.au/software/libglade/) or Boa Constructor
(http://boa-constructor.sourceforge.net/). (There might be more of
them.)
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala
that comes with Python.
--
Björn Lindström [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
http://mail.python.org/mailman/listinfo/python-list
Martin Blume [EMAIL PROTECTED] writes:
A great analysis, but what's a pogo stick and where can I get one?
http://search.ebay.com/pogo-stick
--
Bjrn Lindstrm [EMAIL PROTECTED]
Student of computational linguistics, Uppsala University, Sweden
--
30 matches
Mail list logo