Re: looping through two list simultenously

2006-10-29 Thread Björn Lindström
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

Re: How to coerce a list of vars into a new type?

2006-10-02 Thread Björn Lindström
the intention clearer. -- Björn Lindström [EMAIL PROTECTED] Student of computational linguistics, Uppsala University, Sweden -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python very slow compared to C

2006-02-12 Thread Björn Lindström
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

Re: Calling GPL code from a Python application

2006-01-03 Thread Björn Lindström
. 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

Re: Modifying values in a list

2005-12-29 Thread Björn Lindström
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

Re: Indentation/whitespace

2005-12-24 Thread Björn Lindström
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

Re: Tabs bad

2005-12-06 Thread Björn Lindström
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

Re: Tabs bad

2005-12-05 Thread Björn Lindström
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

Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread 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

Re: Which license should I use?

2005-11-25 Thread Björn Lindström
. -- Björn Lindström [EMAIL PROTECTED] Student of computational linguistics, Uppsala University, Sweden -- http://mail.python.org/mailman/listinfo/python-list

Re: about sort and dictionary

2005-11-24 Thread Björn Lindström
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

Re: Making immutable instances

2005-11-24 Thread Björn Lindström
, 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

Re: Making immutable instances

2005-11-23 Thread Björn Lindström
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

Re: Proposal for adding symbols within Python

2005-11-14 Thread Björn Lindström
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

Re: Proposal for adding symbols within Python

2005-11-13 Thread Björn Lindström
, 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

Re: What do you use as symbols for Python?

2005-11-11 Thread Björn Lindström
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

Re: Circe

2005-11-07 Thread Björn Lindström
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

Re: Python's website does a great disservice to the language

2005-11-02 Thread Björn Lindström
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

Re: Flat file, Python accessible database?

2005-11-01 Thread Björn Lindström
, 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

Re: Scanning a file

2005-10-28 Thread Björn Lindström
) -- Björn Lindström [EMAIL PROTECTED] Student of computational linguistics, Uppsala University, Sweden -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the output from os.system() into a variable?

2005-10-05 Thread Björn Lindström
') 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

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Björn Lindström
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

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Björn Lindström
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

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Björn Lindström
. 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

Re: Standard Threads vs Weightless Threads

2005-08-01 Thread Björn Lindström
concurrency easier. -- Björn Lindström [EMAIL PROTECTED] Student of computational linguistics, Uppsala University, Sweden -- http://mail.python.org/mailman/listinfo/python-list

Re: flatten()

2005-07-07 Thread Björn Lindström
, 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

Re: map vs. list-comprehension

2005-06-29 Thread Björn Lindström
://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

Re: Boss wants me to program

2005-06-27 Thread Björn Lindström
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

Re: noob question

2005-06-25 Thread Björn Lindström
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

Re: oddness in super()

2005-06-19 Thread Björn Lindström
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 --