Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39463 > unrolled thread
| Started by | Piterrr <piterrr.dolinski@gmail.com> |
|---|---|
| First post | 2013-02-21 13:26 -0800 |
| Last post | 2013-02-25 19:37 -0800 |
| Articles | 20 on this page of 161 — 34 participants |
Back to article view | Back to comp.lang.python
Python Newbie Piterrr <piterrr.dolinski@gmail.com> - 2013-02-21 13:26 -0800
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-21 14:54 -0700
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-21 21:58 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 08:59 +1100
Re: Python Newbie Peter Pearson <ppearson@nowhere.invalid> - 2013-02-21 22:03 +0000
Re: Python Newbie Dave Angel <davea@davea.name> - 2013-02-21 17:22 -0500
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-21 14:40 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 10:21 +1100
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-21 15:34 -0800
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-21 23:48 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 11:32 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 11:58 -0700
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-21 15:34 -0800
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-21 23:27 +0000
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-21 16:55 -0700
Re: Python Newbie rusi <rustompmody@gmail.com> - 2013-02-21 22:57 -0800
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-22 10:26 +0000
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-22 12:05 +0100
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 22:23 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 16:04 -0700
Re: Python Newbie Vito De Tullio <vito.detullio@gmail.com> - 2013-02-24 09:23 +0100
Re: Python Newbie "J.R." <groups_jr-1@yahoo.com.br> - 2013-02-24 23:02 -0300
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 21:03 -0500
Re: Python Newbie "J.R." <groups_jr-1@yahoo.com.br> - 2013-02-24 23:35 -0300
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 13:31 +1100
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-21 19:35 -0500
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-21 23:50 -0500
Re: Python Newbie Rui Maciel <rui.maciel@gmail.com> - 2013-02-22 11:58 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 23:12 +1100
Re: Python Newbie Rui Maciel <rui.maciel@gmail.com> - 2013-02-22 13:50 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 01:05 +1100
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 00:03 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 11:21 +1100
Re: Python Newbie Duncan Booth <duncan.booth@invalid.invalid> - 2013-02-22 14:26 +0000
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-22 15:45 +0100
Re: Python Newbie Duncan Booth <duncan.booth@invalid.invalid> - 2013-02-22 15:02 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 02:06 +1100
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 13:37 -0800
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-22 22:08 +0000
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-22 15:45 -0700
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 15:38 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 11:17 +1100
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-23 13:29 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 08:38 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 15:52 -0700
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 10:18 +1100
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-23 15:46 -0800
Re: Python Newbie Larry Hudson <orgnut@yahoo.com> - 2013-02-23 20:20 -0800
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 14:34 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 07:46 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 02:52 +1100
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 11:22 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-24 17:44 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 11:29 -0800
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 21:35 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 14:43 -0800
Re: Python Newbie Joel Goldstick <joel.goldstick@gmail.com> - 2013-02-24 18:05 -0500
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 23:13 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 14:43 -0800
Re: Python Newbie Larry Hudson <orgnut@yahoo.com> - 2013-02-26 00:32 -0800
Re: Python Newbie rurpy@yahoo.com - 2013-02-26 10:23 -0800
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-26 10:59 -0800
Re: Python Newbie rurpy@yahoo.com - 2013-02-26 13:30 -0800
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 18:31 -0700
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 09:08 +1100
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-24 23:18 +0000
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 22:51 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 15:38 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 10:45 +1100
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 15:53 -0800
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 16:08 -0800
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-25 00:28 +0000
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-25 00:38 +0000
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 16:33 -0800
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-25 00:45 +0000
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 19:50 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 01:04 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 12:27 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 18:42 -0700
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 12:24 +1100
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-25 01:44 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 12:53 +1100
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-25 02:23 +0000
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 18:59 -0800
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 16:08 -0800
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 19:42 -0500
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 15:38 -0800
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 23:21 +0000
Re: Python Newbie Dave Angel <davea@davea.name> - 2013-02-24 17:47 -0500
Re: Python Newbie Serhiy Storchaka <storchaka@gmail.com> - 2013-02-25 14:40 +0200
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 07:46 -0800
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 22:23 -0700
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-24 00:11 +0000
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 12:37 -0500
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 10:56 -0700
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 13:07 -0500
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 21:01 -0500
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 15:38 -0800
Re: Python Newbie Terry Reedy <tjreedy@udel.edu> - 2013-02-22 20:04 -0500
Re: Python Newbie rurpy@yahoo.com - 2013-02-22 18:48 -0800
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-22 20:47 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 02:02 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 13:18 +1100
Re: Python Newbie Grant Edwards <invalid@invalid.invalid> - 2013-02-24 18:19 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:25 +1100
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-22 21:40 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 13:48 +1100
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-23 02:59 +0000
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-23 13:34 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 08:40 +1100
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 12:41 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 04:13 +0000
Re: Python Newbie Serhiy Storchaka <storchaka@gmail.com> - 2013-02-23 11:48 +0200
Re: Python Newbie Rui Maciel <rui.maciel@gmail.com> - 2013-02-23 12:30 +0000
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-23 16:43 +0100
Re: Python Newbie jmfauth <wxjmfauth@gmail.com> - 2013-02-23 10:44 -0800
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-23 12:13 -0700
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-23 11:08 -0800
Re: Python Newbie jmfauth <wxjmfauth@gmail.com> - 2013-02-23 12:53 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 08:48 +1100
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 00:02 +0000
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 12:16 -0700
Re: Python Newbie Matej Cepl <mcepl@redhat.com> - 2013-02-24 00:06 +0100
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 02:51 +1100
Re: Python Newbie Matej Cepl <mcepl@redhat.com> - 2013-02-24 00:04 +0100
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-23 08:32 -0800
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-23 18:39 +0100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 12:19 -0700
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 17:11 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 11:40 -0800
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-24 15:06 -0500
Re: Python Newbie "Michael Ross" <gmx@ross.cx> - 2013-02-24 21:33 +0100
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-24 20:34 +0000
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 20:41 +0000
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 12:34 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:42 +1100
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 15:48 -0500
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 21:58 +0000
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 21:08 -0500
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-25 02:59 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:47 +1100
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:58 +1100
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 16:08 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 08:44 +1100
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-24 17:40 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 01:11 +0000
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 00:42 +0000
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 18:34 -0700
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 14:33 -0800
Re: Python Newbie Albert Hopkins <marduk@letterboxes.org> - 2013-02-24 18:32 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 10:44 +1100
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 01:06 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 11:40 -0800
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 13:37 -0800
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-22 20:05 -0500
Re: Python Newbie Gene Heskett <gheskett@wdtv.com> - 2013-02-23 12:32 -0500
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-23 19:10 +0100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 11:40 -0700
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 12:15 -0700
Re: Python Newbie Gene Heskett <gheskett@wdtv.com> - 2013-02-23 17:49 -0500
Re: Python Newbie Nick Mellor <thebalancepro@gmail.com> - 2013-02-25 19:37 -0800
Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9 Next page →
| From | Mitya Sirenef <msirenef@lightbird.net> |
|---|---|
| Date | 2013-02-22 20:47 -0500 |
| Message-ID | <mailman.2322.1361584044.2939.python-list@python.org> |
| In reply to | #39615 |
On 02/22/2013 04:37 PM, piterrr.dolinski@gmail.com wrote:
> Thanks to everyone for all the posts, some friendly some not. I read all of them with genuine interest.
>
> So I am continuing to learn Python, here are my new observations for
your consideration.
>
> There seems to be a "heated" argument about Python's apparently
> intentional ambiguity in conditional statements. Specifically, the
> issue is, is it more appropriate to write (as an example)
I would say it's not a case of ambiguity but that you want the language
syntax to provide you hints that are not directly relevant to the logic
of a statement.
if mylist: # unambiguous check for whether mylist evaluates to boolean True
if mylist == []: # gives you a hint that mylist is meant to be an empty
# or a non-empty list
But what if I have:
process(mylist)
where is my hint? Why is hint required in an if statement but not
required in other cases when mylist is used: function calls, loops,
summation, etc?
The point is, if variables have good names, the hint is not necessary
and if variables have terrible names, you have bigger problems to deal
with.
>
> if (some statement): # short form
>
> rather than
>
> if (some statement == true): # long form
>
> Some 50(?) years ago, C was designed so that everything other than 0
> evaluated to true and was false otherwise. Fast forward to recent
> memory, when C# was designed, Microsoft claims they reviewed all the
> features of C, C++ and Java, pulled the best features from each of
Fun fact: few language designers claim they took all the _worst_
features from other languages, or that they took a random sampling of
worst, best and middling features.
> these languages and designed a new language that would help minimize
> the potential for planting bugs. Say what you want about MS
> inventions, but my experience is that to require the long form
> notation was a good decision. For me the fact that the short notation
> is legal in Python is a stepback in language design. Python inventors,
> when creating what is after all considered a contemporary language,
> should have known better. Call me psychopath if you will (have seen
> this in one post), but I shall continue to use the aforementioned long
> form as I always have, and no Python is going to change that.
>
>
> Today I learned the hard way that all function parameters in Python
> are passed by reference (meaning whatever happens to them inside a
> function, new values are always passed to caller). Not good. I got
> caught up on this. To combat the mostly unwanted behavior, inside a
> function I have to reassign variables intended to be local to new
> variables. A pain. Can anyone offer ONE reason why Python was designed
> that way?
The idea is that copying should always be explicit so that if you don't
want the object to be copied, you pass it around and change it as
needed, and if you want the copy, you make a copy explicitly.
It makes sense to me because if you had a large sequence or mapping and
passed it to a hundred (or a thousand) functions, you'd have a hundred
or thousand copies - not good for performance. When you need a copy -
make a copy, what can be simpler than that?
>
> Out of curiosity, does anyone have any idea why function declarations
> are preceded by the keyword "def" rather than something more intuitive
> like "function" or at least "func", perhaps?
But it's not a function, it's a function definition! Why are you not
demanding 'function definition' instead? function implies the function
object, which is what you use after you define the function definition.
Def is a bit aesthetically better and unambiguous (I thought you were a
fan of that?). func sounds like you work on a tough project and get too
deep in it and forget to shower for a few weeks no I mean days, what a
silly mistake to make (I guess I could just go back and fix it), but my
point is, function would work too but def is perfectly short and clear.
>
> Does anyone know what the benefit of writing the cryptic "elif" to
> mean "else if" is? Curiously, the default statement in an if/else
> chain is preceded by "else" and not "el".
ruby, unix shells, c preprocessor also use elif; perl uses elsif, php
uses elseif.
It's a judgement call, I for one like elif a bit better because it's
shorter without sacrificing clarity.
>
> Someone said I am too narrow-sited appreciating C# and not open to
> alternate approaches to language design. Well if that someone says
> "def" is better than "function" and "elif" is better than "else if",
> then dare I say, you are obsessed with Python!
>
> So far I am getting the impression that Python is a toy language of
> some kind (similar to Basic of the early 80's), not really suitable
> for serious work. The only difference between these languages
> (admittedly, a serious one) is the existence of extensive libraries.
> Otherwise there would be no good reason for Python to exist.
> Nevertheless, it does exist and I have to learn it. As long as someone
> is paying for my time, that's OK with me.
It's been used for many important projects by a huge number of big
companies:
http://www.python.org/about/success/
Unlike Java and C#, it's not backed by a marketing effort of a large
company, so its success is entirely due to its value.
-m
--
Lark's Tongue Guide to Python: http://lightbird.net/larks/
A conception not reducible to the small change of daily experience is like
a currency not exchangeable for articles of consumption; it is not a
symbol, but a fraud. George Santayana
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-02-23 02:02 +0000 |
| Message-ID | <51282334$0$29988$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #39640 |
On Fri, 22 Feb 2013 20:47:20 -0500, Mitya Sirenef wrote: > It's been used for many important projects by a huge number of big > companies: > > http://www.python.org/about/success/ > > Unlike Java and C#, it's not backed by a marketing effort of a large > company, so its success is entirely due to its value. +1 QOTW Well said. While Sun (now Oracle) have spent millions marketing Java, and Microsoft done the same for C#, Python has got where it is almost entirely on merit and word-of-mouth. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-02-23 13:18 +1100 |
| Message-ID | <mailman.2324.1361585939.2939.python-list@python.org> |
| In reply to | #39641 |
On Sat, Feb 23, 2013 at 1:02 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > On Fri, 22 Feb 2013 20:47:20 -0500, Mitya Sirenef wrote: > >> It's been used for many important projects by a huge number of big >> companies: >> >> http://www.python.org/about/success/ >> >> Unlike Java and C#, it's not backed by a marketing effort of a large >> company, so its success is entirely due to its value. > > +1 QOTW > > > Well said. While Sun (now Oracle) have spent millions marketing Java, and > Microsoft done the same for C#, Python has got where it is almost > entirely on merit and word-of-mouth. It's worth noting, though, that there are self-perpetuating aspects to it. I can happily distribute a .py file to a Linux audience, because many Linux distros come with a Python already installed, or at very least can grab one easily via the package manager. No matter how awesome Fred's Awesome Internet Language is, it's not going to be as good a choice as something that people can simply 'apt-get install', 'yum install', or whatever they're most familiar with. I don't have enough history with Python to know when that status began to be achieved, nor how it happened, but I'd guess that exciting/interesting a distro manager is different from being the best choice for writing an application. That said, though, Python is very good at both halves. But there might very well be a language far superior for writing (say) a GUI app, that just doesn't have the traction that Python does thanks to its usefulness in the plumbing. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2013-02-24 18:19 +0000 |
| Message-ID | <kgdljs$pt8$1@reader1.panix.com> |
| In reply to | #39643 |
On 2013-02-23, Chris Angelico <rosuav@gmail.com> wrote:
> It's worth noting, though, that there are self-perpetuating aspects to
> it. I can happily distribute a .py file to a Linux audience, because
> many Linux distros come with a Python already installed, or at very
> least can grab one easily via the package manager.
Are there any popular, mainstream Linux distros that don't come with
Python installed by default?
RedHat has had Python installed as part of the base system since day
1, since both the installer and some of the system admin stuff was
written in Python. I always thought RPM also originally written in
Python, but can't find any references. In any case, yum is written in
Python, so I doubt there are any RPM-based distros that don't have
Python as part of a base install.
Python is required by Gentoo, since the package management tools are
written (at least partially) in Python. In theory, it might be
possible to do an install tha doesn't include Python by using a
different package-management system, but in practice Python is always
there on Gentoo systems.
All of the Debian systems I've seen had Python installed, but I'm not
sure how "required" it is.
AFAICT, Python is installed as part of all Ubuntu installations as
well.
--
Grant Edwards grant.b.edwards Yow! Did you move a lot of
at KOREAN STEAK KNIVES this
gmail.com trip, Dingy?
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-02-25 07:25 +1100 |
| Message-ID | <mailman.2428.1361737538.2939.python-list@python.org> |
| In reply to | #39767 |
On Mon, Feb 25, 2013 at 5:19 AM, Grant Edwards <invalid@invalid.invalid> wrote: > On 2013-02-23, Chris Angelico <rosuav@gmail.com> wrote: > >> It's worth noting, though, that there are self-perpetuating aspects to >> it. I can happily distribute a .py file to a Linux audience, because >> many Linux distros come with a Python already installed, or at very >> least can grab one easily via the package manager. > > Are there any popular, mainstream Linux distros that don't come with > Python installed by default? Probably all the main desktop distros come with _some_ Python (but not necessarily a recent one... RHEL with 2.4?!). I used "many" rather than "all" in case there's one somewhere that doesn't, but even then, Python will be an easily-added feature. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Mitya Sirenef <msirenef@lightbird.net> |
|---|---|
| Date | 2013-02-22 21:40 -0500 |
| Message-ID | <mailman.2325.1361587250.2939.python-list@python.org> |
| In reply to | #39641 |
On 02/22/2013 09:18 PM, Chris Angelico wrote: > On Sat, Feb 23, 2013 at 1:02 PM, Steven D'Aprano > <steve+comp.lang.python@pearwood.info> wrote: >> On Fri, 22 Feb 2013 20:47:20 -0500, Mitya Sirenef wrote: >> >>> It's been used for many important projects by a huge number of big >>> companies: >>> >>> http://www.python.org/about/success/ >>> >>> Unlike Java and C#, it's not backed by a marketing effort of a large >>> company, so its success is entirely due to its value. >> >> +1 QOTW >> >> >> Well said. While Sun (now Oracle) have spent millions marketing Java, and >> Microsoft done the same for C#, Python has got where it is almost >> entirely on merit and word-of-mouth. > > It's worth noting, though, that there are self-perpetuating aspects to > it. I can happily distribute a .py file to a Linux audience, because > many Linux distros come with a Python already installed, or at very > least can grab one easily via the package manager. No matter how > awesome Fred's Awesome Internet Language is, it's not going to be as > good a choice as something that people can simply 'apt-get install', > 'yum install', or whatever they're most familiar with. I don't have > enough history with Python to know when that status began to be > achieved, nor how it happened, but I'd guess that exciting/interesting > a distro manager is different from being the best choice for writing > an application. > > That said, though, Python is very good at both halves. But there might > very well be a language far superior for writing (say) a GUI app, that > just doesn't have the traction that Python does thanks to its > usefulness in the plumbing. > > ChrisA Sure, that's true; I mostly meant it in context of stuff listed on that page, and when compared to languages of similar age. It's also worth noting that if there's a new language that is somewhat better than all established languages, but not to the extent that it will ever replace them (because of network effects), it's not really better for any practical purposes -- present and future[*] ecosystem is a part of a language's value proposition. -m [*] of course, future is hard to predict, especially when it hasn't yet happened. -- Lark's Tongue Guide to Python: http://lightbird.net/larks/ True friends stab you in the front. Oscar Wilde
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-02-23 13:48 +1100 |
| Message-ID | <mailman.2326.1361587741.2939.python-list@python.org> |
| In reply to | #39641 |
On Sat, Feb 23, 2013 at 1:40 PM, Mitya Sirenef <msirenef@lightbird.net> wrote: > It's also worth noting that if there's a new language that is somewhat > better than all established languages, but not to the extent that it > will ever replace them (because of network effects), it's not really > better for any practical purposes -- present and future[*] ecosystem is a > part of a language's value proposition. Right. In a pure and clinical sense, it may be "better" - it might save you 10% on dev time and 25% on run time, say - but if it costs you more than that in support and documentation when you explain to people how they have to install a new language interpreter to use it, it's a much less promising proposal. (That's why Gypsum, my MUD client written in Pike, is still a toy. I was fully aware that I was saddling it with an obscure language interpreter.) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-02-23 02:59 +0000 |
| Message-ID | <mailman.2328.1361588381.2939.python-list@python.org> |
| In reply to | #39641 |
On 23/02/2013 02:40, Mitya Sirenef wrote: > On 02/22/2013 09:18 PM, Chris Angelico wrote: >> On Sat, Feb 23, 2013 at 1:02 PM, Steven D'Aprano > > <steve+comp.lang.python@pearwood.info> wrote: > >> On Fri, 22 Feb 2013 20:47:20 -0500, Mitya Sirenef wrote: > >> > >>> It's been used for many important projects by a huge number of big > >>> companies: > >>> > >>> http://www.python.org/about/success/ > >>> > >>> Unlike Java and C#, it's not backed by a marketing effort of a large > >>> company, so its success is entirely due to its value. > >> > >> +1 QOTW > >> > >> > >> Well said. While Sun (now Oracle) have spent millions marketing > Java, and > >> Microsoft done the same for C#, Python has got where it is almost > >> entirely on merit and word-of-mouth. > > > > It's worth noting, though, that there are self-perpetuating aspects to > > it. I can happily distribute a .py file to a Linux audience, because > > many Linux distros come with a Python already installed, or at very > > least can grab one easily via the package manager. No matter how > > awesome Fred's Awesome Internet Language is, it's not going to be as > > good a choice as something that people can simply 'apt-get install', > > 'yum install', or whatever they're most familiar with. I don't have > > enough history with Python to know when that status began to be > > achieved, nor how it happened, but I'd guess that exciting/interesting > > a distro manager is different from being the best choice for writing > > an application. > > > > That said, though, Python is very good at both halves. But there might > > very well be a language far superior for writing (say) a GUI app, that > > just doesn't have the traction that Python does thanks to its > > usefulness in the plumbing. > > > > ChrisA > > > Sure, that's true; I mostly meant it in context of stuff listed on that > page, and when compared to languages of similar age. > > It's also worth noting that if there's a new language that is somewhat > better than all established languages, but not to the extent that it > will ever replace them (because of network effects), it's not really > better for any practical purposes -- present and future[*] ecosystem is a > part of a language's value proposition. > > -m > > [*] of course, future is hard to predict, especially when it hasn't yet > happened. > > Seems like as good a time as any to throw this into the pot http://www.gossamer-threads.com/lists/python/python/129650?do=post_view_threaded -- Cheers. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-02-23 13:34 -0500 |
| Message-ID | <mailman.2365.1361644497.2939.python-list@python.org> |
| In reply to | #39641 |
On Sat, 23 Feb 2013 13:18:56 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following in gmane.comp.python.general:
> awesome Fred's Awesome Internet Language is, it's not going to be as
Pardon, but was that deliberate -> FAIL
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-02-24 08:40 +1100 |
| Message-ID | <mailman.2379.1361655665.2939.python-list@python.org> |
| In reply to | #39641 |
On Sun, Feb 24, 2013 at 5:34 AM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote: > On Sat, 23 Feb 2013 13:18:56 +1100, Chris Angelico <rosuav@gmail.com> > declaimed the following in gmane.comp.python.general: > >> awesome Fred's Awesome Internet Language is, it's not going to be as > > Pardon, but was that deliberate -> FAIL :) Yep. It ended up feeling a little contrived, and I should have changed the word "awesome" before it once "Awesome" got into the acronym, but yeah, that was deliberate. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-02-24 12:41 -0500 |
| Message-ID | <mailman.2419.1361727888.2939.python-list@python.org> |
| In reply to | #39641 |
On Sun, 24 Feb 2013 08:40:57 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following in gmane.comp.python.general:
> On Sun, Feb 24, 2013 at 5:34 AM, Dennis Lee Bieber
> <wlfraed@ix.netcom.com> wrote:
> > On Sat, 23 Feb 2013 13:18:56 +1100, Chris Angelico <rosuav@gmail.com>
> > declaimed the following in gmane.comp.python.general:
> >
> >> awesome Fred's Awesome Internet Language is, it's not going to be as
> >
> > Pardon, but was that deliberate -> FAIL
>
> :) Yep. It ended up feeling a little contrived, and I should have
> changed the word "awesome" before it once "Awesome" got into the
> acronym, but yeah, that was deliberate.
>
Good -- I'd hate to think I was reading in hidden meanings that
weren't really there.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-02-23 04:13 +0000 |
| Message-ID | <512841ff$0$29988$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #39615 |
On Fri, 22 Feb 2013 13:37:20 -0800, piterrr.dolinski wrote:
> Today I learned the hard way that all function parameters in Python are
> passed by reference (meaning whatever happens to them inside a function,
> new values are always passed to caller). Not good.
Today you learned wrong.
This is a common misapprehension. Python is not pass by reference, nor is
it pass by value. There are many, many more argument passing strategies
used than just those two. Like Ruby and Java, Python is pass by object-
reference, or pass by sharing if you prefer.
You can read more about this here:
http://www.mail-archive.com/tutor%40python.org/msg46612.html
The canonical test of pass-by-reference is to write a "swap" procedure,
one which swaps the values of any two variables:
a = 1
b = 2
swap(a, b)
assert a == 2, b == 1
You cannot write this in Python.
The canonical test of pass by value is that arguments are copied when you
pass them to a function:
a = 1
def different_from_global(argument):
assert id(argument) != id(a)
different_from_global(a) # fails
Python does not copy arguments when you pass them to functions.
> I got caught up on
> this. To combat the mostly unwanted behavior, inside a function I have
> to reassign variables intended to be local to new variables. A pain. Can
> anyone offer ONE reason why Python was designed that way?
Because it is a sensible way to operate for an object-oriented language.
Python will not unnecessarily copy data that doesn't need to be copied.
If you want a copy, you copy it yourself. On the other hand, function
parameters should be local to the function. These two requirements rule
out both pass by value and pass by reference as the parameter passing
model.
> Out of curiosity, does anyone have any idea why function declarations
> are preceded by the keyword "def" rather than something more intuitive
> like "function" or at least "func", perhaps?
"def" is short for "define". As for why the keyword was chosen to be
"def" rather than "define" (like Scheme), "function" (like Pascal),
"defun" (like Lisp), "fun" (like Erland), "define method" (like Dylan),
or even "swyddogaeth" (Welsh), that's just a matter of personal taste of
the creator.
--
Steven
[toc] | [prev] | [next] | [standalone]
| From | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| Date | 2013-02-23 11:48 +0200 |
| Message-ID | <mailman.2331.1361612938.2939.python-list@python.org> |
| In reply to | #39649 |
On 23.02.13 06:13, Steven D'Aprano wrote: > "def" is short for "define". Actually "def" is short for "DEfine Function".
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2013-02-23 12:30 +0000 |
| Message-ID | <kgacni$vdo$1@dont-email.me> |
| In reply to | #39615 |
piterrr.dolinski@gmail.com wrote: <snip/> > So far I am getting the impression that Python is a toy language of some > kind (similar to Basic of the early 80's), not really suitable for serious > work. The only difference between these languages (admittedly, a serious > one) is the existence of extensive libraries. Otherwise there would be no > good reason for Python to exist. Nevertheless, it does exist and I have to > learn it. As long as someone is paying for my time, that's OK with me. That's some military-grade trolling. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | Steve Simmons <square.steve@gmail.com> |
|---|---|
| Date | 2013-02-23 16:43 +0100 |
| Message-ID | <mailman.2351.1361634194.2939.python-list@python.org> |
| In reply to | #39615 |
On 22/02/2013 22:37, piterrr.dolinski@gmail.com wrote:
> So far I am getting the impression that Python is a toy language of some kind (similar to Basic of the early 80's), not really suitable for serious work. The only difference between these languages (admittedly, a serious one) is the existence of extensive libraries. Otherwise there would be no good reason for Python to exist. Nevertheless, it does exist and I have to learn it. As long as someone is paying for my time, that's OK with me.
As with any comparison between languages, some of what you say is right
and some not so much. I'm working with Python because I wanted to and,
although I'm in a similar place on the learning curve, I think its OK.
My first exposure to Python was when my son came home with a project to
map Gaussian distributions in Python. The problem wasn't well defined
and the lessons on Python were either poor or not absorbed by my son.
Nevertheless, we got stuck in and, within the two weeks available, made
a decent stab at delivering some results.
Now I'm writing (in my spare time) an application to take images of
passports via a specialist camera, read the Machine Readable Zone,
check data on the new RFID passports and store it in a searchable
database ('serious work' in my estimation). I chose Python for the job
in spite of the fact that the supplier of the camera "doesn't support"
Python.
Why Python? Because I found it approachable (similar to Basic);
readable - if you write it properly (similar to Basic); because it has
an excellent & well supported range of libraries (unlike Basic); because
it has a choice of excellent GUI tool-sets (unlike Basic), because it is
supported by an absolute gold-mine of enthusiastic hackers - in the best
sense of the word (unlike Basic); because it is portable (arguably
unlike Basic) and because I thought it had the shallowest learning curve
amongst some of the supported options (C/C++, Java, Delphi, FoxPro - yes
really).
I get the impression that you are a developer of some experience on a
single language. I wouldn't call myself a developer but I have written,
modified and/or debugged software in upwards of 20 languages and, from
that perspective, I would say that the second language you learn is
probably the hardest for the simple reason that you have to put away a
bunch of learned prejudices and learn a whole new set. After three or
four, you start to see the commonalities and differences and 'get' why
they exist and you find yourself with a new set of learned prejudices
:-) but you also gain the perspective that some languages are good at
'this' while others are good at 'that'.
If it is any consolation, I'm still struggling with
'pass-by-object-pointer' (or whatever it is called) and finding the
'Pythonic Way' to do things but I'm still liking it.
My main message to you would be : don't approach Python with a negative
attitude, give it a chance and I'm sure you'll come to enjoy it.
Steve
[toc] | [prev] | [next] | [standalone]
| From | jmfauth <wxjmfauth@gmail.com> |
|---|---|
| Date | 2013-02-23 10:44 -0800 |
| Message-ID | <e70c7fcb-39f7-4669-9e37-e56e2b2151d9@y9g2000vbb.googlegroups.com> |
| In reply to | #39675 |
On 23 fév, 16:43, Steve Simmons <square.st...@gmail.com> wrote:
> On 22/02/2013 22:37, piterrr.dolin...@gmail.com wrote:> So far I am getting the impression
...
>
> My main message to you would be : don't approach Python with a negative
> attitude, give it a chance and I'm sure you'll come to enjoy it.
>
----
Until you realize this:
Py32:
>>> timeit.timeit("'abc需'")
0.032749386495456466
>>> sys.getsizeof('abc需')
42
Py33:
>>> timeit.timeit("'abc需'")
0.04104208536801017
>>> sys.getsizeof('abc需')
50
Very easy to explain: wrong, incorrect, naive unicode
handling.
jmf
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-02-23 12:13 -0700 |
| Message-ID | <mailman.2371.1361646864.2939.python-list@python.org> |
| In reply to | #39698 |
On Sat, Feb 23, 2013 at 11:44 AM, jmfauth <wxjmfauth@gmail.com> wrote:
> Until you realize this:
>
> Py32:
>
>>>> timeit.timeit("'abc需'")
> 0.032749386495456466
>>>> sys.getsizeof('abc需')
> 42
>
> Py33:
>
>>>> timeit.timeit("'abc需'")
> 0.04104208536801017
>>>> sys.getsizeof('abc需')
> 50
>
> Very easy to explain: wrong, incorrect, naive unicode
> handling.
You've previously been asked not to hijack unrelated threads with your
misguided Unicode FUD. Since you persist in doing so, consider your
posts now relegated to my trash folder.
[toc] | [prev] | [next] | [standalone]
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2013-02-23 11:08 -0800 |
| Message-ID | <mailman.2374.1361647007.2939.python-list@python.org> |
| In reply to | #39698 |
On 02/23/2013 10:44 AM, jmfauth wrote: [snip various stupidities] > jmf Peter, jmfauth is one of our resident trolls. Feel free to ignore him. -- ~Ethan~
[toc] | [prev] | [next] | [standalone]
| From | jmfauth <wxjmfauth@gmail.com> |
|---|---|
| Date | 2013-02-23 12:53 -0800 |
| Message-ID | <ab91b67a-dd2d-438d-893f-e47551740987@he10g2000vbb.googlegroups.com> |
| In reply to | #39706 |
On 23 fév, 20:08, Ethan Furman <et...@stoneleaf.us> wrote: > On 02/23/2013 10:44 AM, jmfauth wrote: > > [snip various stupidities] > > > jmf > > Peter, jmfauth is one of our resident trolls. Feel free to ignore him. > > -- > ~Ethan~ Sorry, what can say? More memory and slow down! If you see a progress, I'm seeing a regression. Did you test Devanagari canonical decomposition? Probably not. I did it. I wrote probably more tests than any core developper and tests doing precisely what this flexible representation does (not like the tests I saw). That's the good point of all this story. It is not every day that, one has two implementations of the same product, if one wishes to explain, to teach, to illustrate unicode or the coding of the characters in general. Unicode is not different from the other coding schemes and it behaves exactly in the same way. The solely and basic difference lies in the set of the *characters* which is broader. Unicode, the Consortium, uses the term, "Abstract Character Repertoire". jmf
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-02-24 08:48 +1100 |
| Message-ID | <mailman.2380.1361656114.2939.python-list@python.org> |
| In reply to | #39711 |
On Sun, Feb 24, 2013 at 7:53 AM, jmfauth <wxjmfauth@gmail.com> wrote: > On 23 fév, 20:08, Ethan Furman <et...@stoneleaf.us> wrote: >> On 02/23/2013 10:44 AM, jmfauth wrote: >> >> [snip various stupidities] >> >> > jmf >> >> Peter, jmfauth is one of our resident trolls. Feel free to ignore him. >> >> -- >> ~Ethan~ > > Sorry, what can say? > More memory and slow down! > If you see a progress, I'm seeing a regression. Potted summary for those who aren't familiar with jmf's trolling: Python 3.2 had a major bug in its Unicode handling, meaning that non-BMP characters were mis-handled. Python 3.3 fixes these AND improves performance on the whole. The complaints are about *very* specific use-cases, and the overall string-handling benchmarks have dramatically improved; but more importantly, the bug is fixed. There, now you too can killfile him without loss. ChrisA
[toc] | [prev] | [next] | [standalone]
Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9 Next page →
Back to top | Article view | comp.lang.python
csiph-web