Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102199 > unrolled thread
| Started by | Fillmore <fillmore_remove@hotmail.com> |
|---|---|
| First post | 2016-01-28 19:01 -0500 |
| Last post | 2016-02-02 19:36 -0500 |
| Articles | 20 on this page of 74 — 27 participants |
Back to article view | Back to comp.lang.python
psss...I want to move from Perl to Python Fillmore <fillmore_remove@hotmail.com> - 2016-01-28 19:01 -0500
Re: psss...I want to move from Perl to Python paul.hermeneutic@gmail.com - 2016-01-28 17:22 -0700
Re: psss...I want to move from Perl to Python Nathan Hilterbrand <nhilterbrand@gmail.com> - 2016-01-28 19:21 -0500
Re: psss...I want to move from Perl to Python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-01-28 19:23 -0800
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-29 14:26 +1100
Re: psss...I want to move from Perl to Python wxjmfauth@gmail.com - 2016-01-30 02:26 -0800
Re: psss...I want to move from Perl to Python Fillmore <fillmore_remove@hotmail.com> - 2016-01-31 17:34 -0500
Re: psss...I want to move from Perl to Python Michael Torrie <torriem@gmail.com> - 2016-01-31 16:45 -0700
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-02-01 10:48 +1100
Re: psss...I want to move from Perl to Python Terry Reedy <tjreedy@udel.edu> - 2016-01-31 18:51 -0500
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-31 18:59 -0800
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-02-01 14:15 +1100
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-31 19:43 -0800
Re: psss...I want to move from Perl to Python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-02-02 14:53 -0800
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-29 11:25 +1100
Re: psss...I want to move from Perl to Python Steven D'Aprano <steve@pearwood.info> - 2016-01-29 18:12 +1100
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-29 18:19 +1100
Re: psss...I want to move from Perl to Python Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-01-29 09:12 +0000
Re: psss...I want to move from Perl to Python James Harris <james.harris.1@gmail.com> - 2016-01-29 11:03 +0000
Re: psss...I want to move from Perl to Python Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-01-29 12:21 +0000
Re: psss...I want to move from Perl to Python Steven D'Aprano <steve@pearwood.info> - 2016-01-30 00:46 +1100
Re: psss...I want to move from Perl to Python Ben Finney <ben+python@benfinney.id.au> - 2016-01-30 09:47 +1100
Re: psss...I want to move from Perl to Python Steven D'Aprano <steve@pearwood.info> - 2016-01-30 22:12 +1100
Re: psss...I want to move from Perl to Python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-01-29 13:30 -0800
Re: psss...I want to move from Perl to Python Fillmore <fillmore_remove@hotmail.com> - 2016-01-29 19:57 -0500
Re: psss...I want to move from Perl to Python Ben Finney <ben+python@benfinney.id.au> - 2016-01-30 12:04 +1100
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-29 19:38 -0800
Re: psss...I want to move from Perl to Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-01-31 11:18 +1300
Re: psss...I want to move from Perl to Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-01-31 12:56 +1100
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-30 19:22 -0800
Re: psss...I want to move from Perl to Python Cameron Simpson <cs@zip.com.au> - 2016-01-31 14:48 +1100
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-30 19:53 -0800
Re: psss...I want to move from Perl to Python Cameron Simpson <cs@zip.com.au> - 2016-01-31 20:56 +1100
Re: psss...I want to move from Perl to Python Paul Rubin <no.email@nospam.invalid> - 2016-01-31 09:45 -0800
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-31 18:08 -0800
Re: psss...I want to move from Perl to Python Steven D'Aprano <steve@pearwood.info> - 2016-01-31 20:23 +1100
Re: psss...I want to move from Perl to Python Cameron Simpson <cs@zip.com.au> - 2016-01-31 20:53 +1100
Re: psss...I want to move from Perl to Python Paul Rubin <no.email@nospam.invalid> - 2016-01-31 09:49 -0800
Re: psss...I want to move from Perl to Python Cameron Simpson <cs@zip.com.au> - 2016-02-01 08:16 +1100
Re: psss...I want to move from Perl to Python Terry Reedy <tjreedy@udel.edu> - 2016-01-31 07:28 -0500
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-31 05:12 -0800
Re: psss...I want to move from Perl to Python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-01-30 14:25 -0800
Re: psss...I want to move from Perl to Python Rustom Mody <rustompmody@gmail.com> - 2016-01-29 20:04 -0800
Re: psss...I want to move from Perl to Python Random832 <random832@fastmail.com> - 2016-01-29 10:07 -0500
Re: psss...I want to move from Perl to Python Fillmore <fillmore_remove@hotmail.com> - 2016-01-29 12:56 -0500
Re: psss...I want to move from Perl to Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-01-30 11:21 +1300
Re: psss...I want to move from Perl to Python sohcahtoa82@gmail.com - 2016-01-29 12:49 -0800
Re: psss...I want to move from Perl to Python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-01-29 14:29 -0800
Re: psss...I want to move from Perl to Python Cameron Simpson <cs@zip.com.au> - 2016-01-30 10:48 +1100
Re: psss...I want to move from Perl to Python Cameron Simpson <cs@zip.com.au> - 2016-01-29 12:20 +1100
Re: psss...I want to move from Perl to Python Paul Rubin <no.email@nospam.invalid> - 2016-01-28 18:06 -0800
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-29 13:34 +1100
Re: psss...I want to move from Perl to Python sohcahtoa82@gmail.com - 2016-01-29 12:41 -0800
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-30 07:54 +1100
Re: psss...I want to move from Perl to Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-01-30 11:27 +1300
Re: psss...I want to move from Perl to Python Michael Torrie <torriem@gmail.com> - 2016-01-28 21:42 -0700
Re: psss...I want to move from Perl to Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-01-29 08:54 -0500
Re: psss...I want to move from Perl to Python Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-01-29 08:24 +0200
Re: psss...I want to move from Perl to Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-01-29 08:50 -0500
Re: psss...I want to move from Perl to Python Fillmore <fillmore_remove@hotmail.com> - 2016-01-29 12:04 -0500
Re: psss...I want to move from Perl to Python "Sven R. Kunze" <srkunze@mail.de> - 2016-01-29 18:39 +0100
Re: psss...I want to move from Perl to Python Fillmore <fillmore_remove@hotmail.com> - 2016-01-29 15:42 -0500
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-30 07:51 +1100
Re: psss...I want to move from Perl to Python Nathan Hilterbrand <nhilterbrand@gmail.com> - 2016-01-29 16:38 -0500
Re: psss...I want to move from Perl to Python Cody Piersall <cody.piersall@gmail.com> - 2016-01-29 15:50 -0600
Re: psss...I want to move from Perl to Python Josef Pktd <josef.pktd@gmail.com> - 2016-01-29 16:48 -0800
Re: psss...I want to move from Perl to Python Terry Reedy <tjreedy@udel.edu> - 2016-01-29 22:08 -0500
Re: psss...I want to move from Perl to Python Chris Angelico <rosuav@gmail.com> - 2016-01-30 14:12 +1100
Re: psss...I want to move from Perl to Python Ben Finney <ben+python@benfinney.id.au> - 2016-01-30 09:49 +1100
Re: psss...I want to move from Perl to Python Larry Hudson <orgnut@yahoo.com> - 2016-01-29 22:22 -0800
Re: psss...I want to move from Perl to Python "Sven R. Kunze" <srkunze@mail.de> - 2016-01-30 13:43 +0100
Re: psss...I want to move from Perl to Python <paul.hermeneutic@gmail.com> - 2016-02-02 10:00 -0700
Re: psss...I want to move from Perl to Python "Martin A. Brown" <martin@linux-ip.net> - 2016-02-02 13:04 -0800
Re: psss...I want to move from Perl to Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-02 19:36 -0500
Page 1 of 4 [1] 2 3 4 Next page →
| From | Fillmore <fillmore_remove@hotmail.com> |
|---|---|
| Date | 2016-01-28 19:01 -0500 |
| Subject | psss...I want to move from Perl to Python |
| Message-ID | <n8ea4q$muu$1@gioia.aioe.org> |
I learned myself Perl as a scripting language over two decades ago. All through this time, I would revert to it from time to time whenever I needed some text manipulation and data analysis script. My problem? maybe I am stupid, but each time I have to go back and re-learn the syntax, the gotchas, the references and the derefercing, the different syntax between Perl 4 and Perl 5, that messy CPAN in which every author seems to have a different ideas of how things should be done.... I get this feeling I am wasting a lot of time restudying the wheel each tim... I look and Python and it looks so much more clean.... add to that that it is the language of choice of data miners... add to that that iNotebook looks powerful.... Does Python have Regexps? How was the Python 2.7 vs Python 3.X solved? which version should I go for? Do you think that switching to Python from Perl is a good idea at 45? Where do I get started moving from Perl to Python? which gotchas need I be aware of? Thank you
[toc] | [next] | [standalone]
| From | paul.hermeneutic@gmail.com |
|---|---|
| Date | 2016-01-28 17:22 -0700 |
| Message-ID | <mailman.68.1454026979.2338.python-list@python.org> |
| In reply to | #102199 |
On Thu, Jan 28, 2016 at 5:01 PM, Fillmore <fillmore_remove@hotmail.com> wrote: > > I learned myself Perl as a scripting language over two decades ago. All > through this time, I would revert to it from time to time whenever I needed > some text manipulation and data analysis script. > > My problem? maybe I am stupid, but each time I have to go back and re-learn > the syntax, the gotchas, the references and the derefercing, the different > syntax between Perl 4 and Perl 5, that messy CPAN in which every author > seems to have a different ideas of how things should be done.... I know what you mean about Perl. I have probably re-learned Perl 12 times. If you will not need to maintain any existing code, go directly to Python 3.x. Not every third-party support Python 3 yet, but it is coming for most. If you can eschew 2.x, then do. Maintaining a source base targeting both 2.x and 3.x can be done, but it is not always a simple picture. Learning a new language at 45 is a great idea. Do it again at 65.
[toc] | [prev] | [next] | [standalone]
| From | Nathan Hilterbrand <nhilterbrand@gmail.com> |
|---|---|
| Date | 2016-01-28 19:21 -0500 |
| Message-ID | <mailman.69.1454027286.2338.python-list@python.org> |
| In reply to | #102199 |
On 01/28/2016 07:01 PM, Fillmore wrote: > > I learned myself Perl as a scripting language over two decades ago. > All through this time, I would revert to it from time to time whenever > I needed some text manipulation and data analysis script. > > My problem? maybe I am stupid, but each time I have to go back and > re-learn the syntax, the gotchas, the references and the derefercing, > the different syntax between Perl 4 and Perl 5, that messy CPAN in > which every author seems to have a different ideas of how things > should be done.... > > I get this feeling I am wasting a lot of time restudying the wheel > each tim... > > I look and Python and it looks so much more clean.... > > add to that that it is the language of choice of data miners... > > add to that that iNotebook looks powerful.... > > Does Python have Regexps? > > How was the Python 2.7 vs Python 3.X solved? which version should I go > for? > > Do you think that switching to Python from Perl is a good idea at 45? > > Where do I get started moving from Perl to Python? > > which gotchas need I be aware of? > > Thank you Python does "have" regex.. it is not part of the language, but is in a separate module. If you are used to the way that regex feels "natural" in perl, you will have some "adjusting" to do. Python 2 vs python 3 is anything but "solved". You will hear arguments in favor of both. I will not make a suggestion, because I do not have on my flame-resistant clothing I am adding Python 3 to my "bag of tricks" after many, many years of perl programming, and I am significantly older than you. I suggest that you just plunge in, and see what you think. It just is NOT that difficult. There are lots of tutorials and books.. some good, some less so. The tutorials on python.org are (IMHO) a very good place to start, though. Gotchas? If you are learning Python after years of perl use, the "gotchas" would be another book just by themselves. Be prepared to do a LOT more typing. Long and short of it... just dig in. I would offer one piece of advice, though... you will probably be better off if you simply view Python totally separately from perl.. sort of like learning a new spoken/written language. Don't try to view concepts as a translation from perl to Python , but rather just view Python as if you were learning to program from scratch. Comparisons will make it much more difficult, in several ways. Best of luck to you, and I hope that you find Python to be too your liking. Nathan
[toc] | [prev] | [next] | [standalone]
| From | Rick Johnson <rantingrickjohnson@gmail.com> |
|---|---|
| Date | 2016-01-28 19:23 -0800 |
| Message-ID | <7ba9135b-74c2-4b50-a38c-ad4af629fc9f@googlegroups.com> |
| In reply to | #102202 |
On Thursday, January 28, 2016 at 6:28:25 PM UTC-6, Nathan Hilterbrand wrote: > Python 2 vs python 3 is anything but "solved". You will hear arguments > in favor of both. I will not make a suggestion, because I do not have > on my flame-resistant clothing Indeed. About the only subject more volatile than the Py2<=>Py3 issue is abortion.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-01-29 14:26 +1100 |
| Message-ID | <mailman.73.1454038023.2338.python-list@python.org> |
| In reply to | #102207 |
On Fri, Jan 29, 2016 at 2:23 PM, Rick Johnson <rantingrickjohnson@gmail.com> wrote: > On Thursday, January 28, 2016 at 6:28:25 PM UTC-6, Nathan Hilterbrand wrote: >> Python 2 vs python 3 is anything but "solved". You will hear arguments >> in favor of both. I will not make a suggestion, because I do not have >> on my flame-resistant clothing > > Indeed. About the only subject more volatile than the Py2<=>Py3 issue is abortion. I'm fairly sure propane is more volatile... ChrisA
[toc] | [prev] | [next] | [standalone]
| From | wxjmfauth@gmail.com |
|---|---|
| Date | 2016-01-30 02:26 -0800 |
| Message-ID | <2a8dc773-87a1-4ffd-8b8f-a77f2f6ff693@googlegroups.com> |
| In reply to | #102202 |
Le vendredi 29 janvier 2016 01:28:25 UTC+1, Nathan Hilterbrand a écrit : > On 01/28/2016 07:01 PM, Fillmore wrote: > > > > Python 2 vs python 3 is anything but "solved". Python 3.5.1 is still suffering from the same buggy behaviour as in Python 3.0 .
[toc] | [prev] | [next] | [standalone]
| From | Fillmore <fillmore_remove@hotmail.com> |
|---|---|
| Date | 2016-01-31 17:34 -0500 |
| Message-ID | <n8m258$1rs2$1@gioia.aioe.org> |
| In reply to | #102291 |
On 01/30/2016 05:26 AM, wxjmfauth@gmail.com wrote: >> Python 2 vs python 3 is anything but "solved". > > > Python 3.5.1 is still suffering from the same buggy > behaviour as in Python 3.0 . Can you elaborate?
[toc] | [prev] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2016-01-31 16:45 -0700 |
| Message-ID | <mailman.175.1454283936.2338.python-list@python.org> |
| In reply to | #102370 |
On 01/31/2016 03:34 PM, Fillmore wrote: > On 01/30/2016 05:26 AM, wxjmfauth@gmail.com wrote: > >>> Python 2 vs python 3 is anything but "solved". >> >> >> Python 3.5.1 is still suffering from the same buggy >> behaviour as in Python 3.0 . > Can you elaborate? Sad to say jmf is a long-time troll on this list who seems to thinks he understands Unicode better than he does. We've been round and round with him on this list over his issues and he's since been banned from the email part of this list, but still spams the Usenet side from time to time. If you're using NNTP, just add him to your kill file or block list. There's nothing to elaborate on. Python 3.5's integrated handling of unicode is the best I've seen in any language. It just works and you don't need to worry about it (unlike most other languages), other than to remember that anytime you take bytes into the program (say from a file) they must be "decoded" into unicode, and whenever you write bytes out (say to a file or socket) unicode strings must be "encoded" to a desired byte encoding, such as UTF-8. Python's in-memory representation of unicode strings is correct (unlike Python 2.7, which had UCS-2 narrow builds that can't handle non-BLM code points) for all unicode codepoints.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-02-01 10:48 +1100 |
| Message-ID | <mailman.176.1454284124.2338.python-list@python.org> |
| In reply to | #102370 |
On Mon, Feb 1, 2016 at 9:34 AM, Fillmore <fillmore_remove@hotmail.com> wrote: > On 01/30/2016 05:26 AM, wxjmfauth@gmail.com wrote: > >>> Python 2 vs python 3 is anything but "solved". >> >> >> >> Python 3.5.1 is still suffering from the same buggy >> behaviour as in Python 3.0 . > > > > Can you elaborate? This is jmf. His posts are suppressed from the mailing list, because the only thing he ever says is that Python 3's "Unicode by default" behaviour is fundamentally and mathematically wrong, on the basis of microbenchmarks showing a performance regression compared to his beloved - and buggy - narrow build of Python 2.7. (I'm not certain, but I think the regression might even have been fixed now. Or maybe he has other regressions to moan about.) Here's a facts-only summary of Unicode handling in several different CPython [0] builds. * Python 2.7 comes in two flavours, selected at compile time. A "Wide" build is the default on Unix-like platforms, and it uses 32-bit Unicode characters. In other words, the string b"abc" takes up three bytes, but the string u"abc" takes up twelve. [1] These builds are perfectly consistent; a Unicode character *always* takes exactly 4 bytes, and indexing and subscripting are perfectly correct. * A "Narrow" build of Python 2.7 (the default on Windows) uses 16-bit Unicode characters. The string b"abc" still takes up three bytes, but u"abc" takes only six - however, the same string with three astral characters would take up twelve bytes. These builds are thus inconsistent, but potentially more efficient - a thousand BMP characters followed by a single SMP character would take up only 2004 bytes, rather than 4004 as a wide build would use. * Starting with Python 3.0, a default quoted string is a Unicode string. That doesn't change anything about these considerations, but it does mean that "abc" suddenly takes up a lot more room than it used to (because it's now equivalent to u"abc" rather than b"abc"). * Python 3.3 introduced a new "Flexible String Representation", which you can read about in detail in PEP 393. Strings are now stored as compactly as possible; u"Hello!" (all ASCII) takes up six bytes, u"¡Hola!" (Latin-1) also takes up six bytes, u"Привет" (Basic Multilingual Plane) takes up twelve, and u"Hi! 😀😁" (or u"Hi! \U0001f600\U0001f601" if your mailer doesn't have those characters) takes up twenty-four. Each string has a length of 6, as given by len(x), but takes up differing amounts of space according to actual needs. The issue jmf has is with the way the FSR has to "widen" a string. If you take a megabyte of all-ASCII text (stored one byte per character) and append one astral character to it, the resulting string has to be stored four bytes per character, even for the ASCII ones. This is to make sure that indexing and slicing work correctly and efficiently, but it does come at a cost - it takes time to copy all those characters into the new wider string. On microbenchmarks doing exactly this, it's clear that Python 3 is paying a price. But has it truly suffered? rosuav@sikorsky:~$ python -m timeit -s "s=u'a'*1048576" "len(s+u'\U0001f600')" 10000 loops, best of 3: 197 usec per loop rosuav@sikorsky:~$ python3 -m timeit -s "s=u'a'*1048576" "len(s+u'\U0001f600')" 10000 loops, best of 3: 148 usec per loop rosuav@sikorsky:~$ python -m timeit -s "s=u'a'*1048576" "len(s+u'b')" 10000 loops, best of 3: 187 usec per loop rosuav@sikorsky:~$ python3 -m timeit -s "s=u'a'*1048576" "len(s+u'b')" 10000 loops, best of 3: 31.6 usec per loop rosuav@sikorsky:~$ python -c 'import sys; print(sys.version)' 2.7.11 (default, Jan 11 2016, 21:04:40) [GCC 5.3.1 20160101] rosuav@sikorsky:~$ python3 -c 'import sys; print(sys.version)' 3.6.0a0 (default:5452e4b5c007, Feb 1 2016, 07:28:50) [GCC 5.3.1 20160121] The other consideration is that, *on Windows only*, this operation takes more memory under 3.6 than under 2.7, because 2.7 will keep storing the 'a' in 16 bits and then just slap a two-code-unit smiley to the end; but on the flip side, 3.6 has been storing that all-ASCII string in *8* bits per character. Most of your programs will be full of ASCII strings - remember, all your variable names are string keys into some dictionary [2], and every time you call up a built-in function or standard library module, you'll be using an ASCII-only name to reference it. Halving their storage space makes a significant difference; and doubling the size of a very few strings in a very few programs is worth the correctness we gain by not having to worry about string index bugs. So in summary: Take no notice of jmf; he's a crank. ChrisA [0] Other Python implementations may be very different, but it's CPython that most people are looking at. [1] If you use sys.getsizeof() on these strings, you'll find that they actually take up a lot more space than I'm talking about. That's because there's overheads on string objects, which dominate tiny strings. But for large strings, where the performance difference actually matters, the storage space of the characters themselves dominates the overhead. [2] Local names in functions might get compiled out and replaced with numeric slot indices. But module-level names, names of built-ins, attribute names, etc, are all stored in the code as actual strings.
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2016-01-31 18:51 -0500 |
| Message-ID | <mailman.177.1454284330.2338.python-list@python.org> |
| In reply to | #102370 |
On 1/31/2016 5:34 PM, Fillmore wrote: > On 01/30/2016 05:26 AM, wxjmfauth@gmail.com wrote: > >>> Python 2 vs python 3 is anything but "solved". >> Python 3.5.1 is still suffering from the same buggy >> behaviour as in Python 3.0 . > > Can you elaborate? Please do not propagate jmf's repeated trolls to python-list -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2016-01-31 18:59 -0800 |
| Message-ID | <bb011e6a-95e4-4190-bb1d-b169646037a1@googlegroups.com> |
| In reply to | #102373 |
On Monday, February 1, 2016 at 5:22:22 AM UTC+5:30, Terry Reedy wrote: > On 1/31/2016 5:34 PM, Fillmore wrote: > > On 01/30/2016 05:26 AM, wxjmfauth wrote: > > > >>> Python 2 vs python 3 is anything but "solved". > >> Python 3.5.1 is still suffering from the same buggy > >> behaviour as in Python 3.0 . > > > > Can you elaborate? > > Please do not propagate jmf's repeated trolls to python-list On Saturday, January 30, 2016 at 3:57:28 PM UTC+5:30, wxjmf wrote: > Python 3.5.1 is still suffering from the same buggy > behaviour as in Python 3.0 . is banned whereas this is not: On Saturday, January 30, 2016 at 3:01:09 AM UTC+5:30, Rick Johnson wrote: > On Friday, January 29, 2016 at 6:21:21 AM UTC-6, Ulli Horlacher wrote: > > I nearly gave up with Python at the very beginning before > > I realised that OO-programming is optional in Python! :-) > > Most tutorials I found so far makes OO mandatory. > > Just more evidence that old dogs are incapable of learning > new tricks. Either learn how to wield Neuroplasticity to > your advantage, or go curl up into a ball and wait for death > to come. People who are unwilling to "expanding their > intellectual horizons" make me sick!!! Not to mention endless screeds like this one: On Saturday, January 30, 2016 at 4:00:12 AM UTC+5:30, Rick Johnson wrote: > On Friday, January 29, 2016 at 2:49:24 PM UTC-6, sohca...@gmail.com wrote: > > > I'm convinced that anyone who actually prefers Perl's > > syntax over Python is suffering from Stockholm Syndrome. > > > > [...] > > > > Readability counts. I'd say readability is one of the > > most important features of a language, as you will read > > your code far more than you write it. Perl is not > > readable. I don't care how powerful your language is if > > you can't read it. > > EXACTLY! > > Which is the same reason why natural language is bound by > many structural rules. For instance: we utilize "syntactical > structures" like sentences and paragraphs to create > "comprehensible groupings", and we *NEVER* want to > arbitrarily, or randomly, use more than one space between > words, or more than one line between paragraphs. > > STRUCTURE IS IMPORTANT! > > And the only thing more important than a "self-imposed > structure" is a steadfast adherence to the "collective style > guides" of written communication. When we *ALL* utilize a > familiar structure, we will *ALL* spend less time > *CONSCIOUSLY INTERPRETING* superficial structural details, > and more time *ABSORBING* the actual meaning of the content. > > ABSORPTION IS THE GOAL, NOT ABERRATION! > > The goal of written communication is no different than any > other technology. We should strive to abstract away as much > as possible to the sub-conscience processes of our mind as > we can, so that we can target our mental focus purely on the > comprehension of content, *NOT* comprehension of structure! > When faced with an unfamiliar "syntactical structure", our > high level focus becomes "mired in the minutiae of the > superficial". > > EVEN WHEN NECESSARY, THE SUPERFICIAL IS NOT IMPORTANT! > > The goal of communication should never be (either > intentional or not) to distract or impress our readers with > our capacity to create "self-aggrandizing ornateness of > structure", which will undoubtedly obfuscate the intended > message, no, but to *STRICTLY* follow the collective > standards and practices of "acceptable syntactical > structuring" that will *facilitate* a smooth transition > between: ideas that are codified into symbolic languages, > and the translation of those linguistic symbols into concepts > in the mind of the reader. > > ABSTRACTIONS ARE VITAL TO OUR COMPREHENSION OF COMPLEX > COMMUNICATION MEDIUMS! > > For communication to function (at it's most basic level) > these abstractions must exist simultaneously in our codified > symbolic languages *AND* in our mental processes that > interpret them. But whilst our mental abstractions are > mostly unconscious, they can become disturbed when > dissonance is injected into symbolic languages in the form > of "poor syntactical structure". Break either link in the > chain, and a "smooth transition of ideas" becomes untenable. Can someone explain the policy?
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-02-01 14:15 +1100 |
| Message-ID | <mailman.0.1454296520.3032.python-list@python.org> |
| In reply to | #102382 |
On Mon, Feb 1, 2016 at 1:59 PM, Rustom Mody <rustompmody@gmail.com> wrote: > On Saturday, January 30, 2016 at 3:57:28 PM UTC+5:30, wxjmf wrote: > >> Python 3.5.1 is still suffering from the same buggy >> behaviour as in Python 3.0 . > > is banned > > whereas this is not: > > On Saturday, January 30, 2016 at 3:01:09 AM UTC+5:30, Rick Johnson wrote: >> On Friday, January 29, 2016 at 6:21:21 AM UTC-6, Ulli Horlacher wrote: >> > I nearly gave up with Python at the very beginning before >> > I realised that OO-programming is optional in Python! :-) >> > Most tutorials I found so far makes OO mandatory. >> >> Just more evidence that old dogs are incapable of learning >> new tricks. Either learn how to wield Neuroplasticity to >> your advantage, or go curl up into a ball and wait for death >> to come. People who are unwilling to "expanding their >> intellectual horizons" make me sick!!! > > > Not to mention endless screeds like this one: > > [chomp more Ranting Rick] > > Can someone explain the policy? Bannings for anything other than out-and-out spam are incredibly rare (as they should be). The main difference is: Rick posts good content veiled by poor framing, but jmf posts the same rehashed whining about the same microbenchmarks, the same unbacked false statements about how Python is "mathematically incorrect", and absolutely no useful content. I tend to skim Rick's posts looking for anything that's actually of interest, but jmf's posts never have anything. There are a lot of people here who post good content but phrase things poorly. And everyone has a bad day. (Terry Reedy, I'm hoping this was just a bad day - there were several rather caustic posts from you. Sorry to single you out, but I can't think of anyone else recently who's done that.) So long as there's something useful being said, the community would be worse off for their removal. That said, though, I would GREATLY prefer Rick to post less provocatively. But I'm not calling for his banning any more than I'd call for Terry's, or my own, for that matter (I've posted plenty of off-topic or otherwise useless posts). ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2016-01-31 19:43 -0800 |
| Message-ID | <44e8cb32-ddc9-43a6-b937-9bb41d92a74c@googlegroups.com> |
| In reply to | #102383 |
On Monday, February 1, 2016 at 8:45:38 AM UTC+5:30, Chris Angelico wrote: > There are a lot of people here who post good content but phrase things > poorly. And everyone has a bad day. (Terry Reedy, I'm hoping this was > just a bad day - there were several rather caustic posts from you. > Sorry to single you out, but I can't think of anyone else recently > who's done that.) So long as there's something useful being said, the > community would be worse off for their removal. Good -- we're agreed on that much > > That said, though, I would GREATLY prefer Rick to post less > provocatively. But I'm not calling for his banning any more than I'd > call for Terry's, or my own, for that matter (I've posted plenty of > off-topic or otherwise useless posts). Yes: Just to be clear I am not asking for Rick to be banned though he needs to be told more often than others to stop assholing. Likewise jmf: Old-timers out here know anyway to ignore his unicode-complaints. And newcomers --eg this thread -- need to be told anyway. So why ban?
[toc] | [prev] | [next] | [standalone]
| From | Rick Johnson <rantingrickjohnson@gmail.com> |
|---|---|
| Date | 2016-02-02 14:53 -0800 |
| Message-ID | <13cae443-80cb-429b-a009-7311498d9174@googlegroups.com> |
| In reply to | #102383 |
On Sunday, January 31, 2016 at 9:15:38 PM UTC-6, Chris Angelico wrote: > That said, though, I would GREATLY prefer Rick to post > less provocatively. I'll admit that my tone can "sometimes" be acerbic, but it's not like i was attacking someone for *NO* justifiable reason, in fact, my response was not an attack at all, but merely, a plea. There is no doubt that a strong undercurrent of "militant anti-OOP" exists within this group (I know, because i've witnessed it for years), and those same militants have attempted to cast *ME* as a some sort of "religious OOP fanatic" -- but nothing could be further from the truth! Yes, (sigh) i've written a lot of Java code (quick, muster the militants!), and whilst I feel that the structural rigidity that java demands *does* encourage good programmers to write consistent code, it *does not* prevent poor programmers from writing garbage, nor does it allow me to fully express myself. Heck, Python's "multi-paradigm" nature, is IMHO, one of it's greatest strengths!!! We humans crave familiarity, because, those concepts that are familiar to us don't require any thought, no, we just wield them instinctively. However, we loath the unfamiliar, because, the unfamiliar requires us to expend mental effort *LEARNING* about the concept, *BEFORE* we can benefit from the fruits of it's power. Therefore, "the familiar" is like having a "slightly cool, diseased-donkey-piss beer" in your hand, and "the unfamiliar" is like having an "ice-cold, quality craft beer" way down in your basement refrigerator -- sometimes, we'd rather drink donkey-piss, than get off the couch. > But I'm not calling for his banning any more than I'd call > for Terry's, or my own, for that matter (I've posted > plenty of off-topic or otherwise useless posts). Chris, we don't always agree, but when we do, i must admit, it's always a *VERY* pleasurable experience. Thank you! :-)
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-01-29 11:25 +1100 |
| Message-ID | <mailman.70.1454027549.2338.python-list@python.org> |
| In reply to | #102199 |
On Fri, Jan 29, 2016 at 11:01 AM, Fillmore <fillmore_remove@hotmail.com> wrote: > Does Python have Regexps? Yes! Although there are often other ways of doing things, so you don't *have* to use a regex for everything. But yes, Python has a powerful regular expression library. > How was the Python 2.7 vs Python 3.X solved? which version should I go for? Go for 3.x, unless you have a particular reason for using 2.7. There are heaps of cool new features in 3.x, and most of the modules you'll need support it. There's now very little reason for going 2.7 for new projects. > Do you think that switching to Python from Perl is a good idea at 45? Definitely. Never too old to learn new tricks. > Where do I get started moving from Perl to Python? Start with the Python tutorial in the docs; flip through that and get an idea of broadly how things work. Then port a simple script, so you know you can make Python do stuff for you. Get your code reviewed by experts (whether it works or not - you'll learn a lot from people saying "Hey, here's a different way you could do that"), and don't take anything personally. > which gotchas need I be aware of? Probably the biggest thing to take note of is the Python object model - how names and objects and assignment work. It's pretty straight-forward, but if it's not what you're used to, you'll need to get your head around it. Here's a good talk on the subject: http://nedbatchelder.com/text/names1.html > Thank you You're most welcome! And welcome to the list. This is a pretty friendly place; don't be afraid to post your code and ask for advice. All the best! ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2016-01-29 18:12 +1100 |
| Message-ID | <56ab10f4$0$1606$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #102203 |
On Fri, 29 Jan 2016 11:25 am, Chris Angelico wrote: > Probably the biggest thing to take note of is the Python object model > - how names and objects and assignment work. It's pretty > straight-forward, but if it's not what you're used to, you'll need to > get your head around it. Here's a good talk on the subject: > > http://nedbatchelder.com/text/names1.html Every time I make a half-hearted attempt to learn enough Perl syntax to get started, I keep running into the differences between $foo, %foo and @foo and dire warnings about what happens if you use the wrong sigil, and then I get confused. Is there a good discussion of how names and references work in Perl, equivalent to Ned's discussion? -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-01-29 18:19 +1100 |
| Message-ID | <mailman.76.1454051981.2338.python-list@python.org> |
| In reply to | #102214 |
On Fri, Jan 29, 2016 at 6:12 PM, Steven D'Aprano <steve@pearwood.info> wrote: > On Fri, 29 Jan 2016 11:25 am, Chris Angelico wrote: > >> Probably the biggest thing to take note of is the Python object model >> - how names and objects and assignment work. It's pretty >> straight-forward, but if it's not what you're used to, you'll need to >> get your head around it. Here's a good talk on the subject: >> >> http://nedbatchelder.com/text/names1.html > > > Every time I make a half-hearted attempt to learn enough Perl syntax to get > started, I keep running into the differences between $foo, %foo and @foo > and dire warnings about what happens if you use the wrong sigil, and then I > get confused. Is there a good discussion of how names and references work > in Perl, equivalent to Ned's discussion? Ooh. Good point. I'd like to see one of those too. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ulli Horlacher <framstag@rus.uni-stuttgart.de> |
|---|---|
| Date | 2016-01-29 09:12 +0000 |
| Message-ID | <n8fadj$qra$1@news2.informatik.uni-stuttgart.de> |
| In reply to | #102214 |
Steven D'Aprano <steve@pearwood.info> wrote: > Every time I make a half-hearted attempt to learn enough Perl syntax to get > started, I keep running into the differences between $foo, %foo and @foo > and dire warnings about what happens if you use the wrong sigil I have started learning Python several times and surrendered because my brain was too Perl hardcoded after 30 years, but NOW I was successful :-) (I still find Perl syntax better...) About the variables in short: $foo is a scalar (number, string, reference, file handle) @foo is an array %foo is a hash (dictionary in Python slang) and yes, you can use them all together in same code, they are different. For more discussion about Perl syntax one should better go to comp.lang.perl -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum IZUS/TIK E-Mail: horlacher@tik.uni-stuttgart.de Universitaet Stuttgart Tel: ++49-711-68565868 Allmandring 30a Fax: ++49-711-682357 70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
[toc] | [prev] | [next] | [standalone]
| From | James Harris <james.harris.1@gmail.com> |
|---|---|
| Date | 2016-01-29 11:03 +0000 |
| Message-ID | <n8fgpe$qsj$1@dont-email.me> |
| In reply to | #102224 |
On 29/01/2016 09:12, Ulli Horlacher wrote: > Steven D'Aprano <steve@pearwood.info> wrote: > >> Every time I make a half-hearted attempt to learn enough Perl syntax to get >> started, I keep running into the differences between $foo, %foo and @foo >> and dire warnings about what happens if you use the wrong sigil > > I have started learning Python several times and surrendered because my > brain was too Perl hardcoded after 30 years, but NOW I was successful :-) I nearly gave up with Python at the very beginning before I realised not to mix tabs and spaces. > (I still find Perl syntax better...) Perl may be easier to 'think in' for those who are familiar with it. Perl syntax is shorter. And expressions have fewer elements as some operands are implied. Python's constructions are more explicit, making the effect more apparent in the source. > About the variables in short: > > $foo is a scalar (number, string, reference, file handle) > @foo is an array > %foo is a hash (dictionary in Python slang) > > and yes, you can use them all together in same code, they are different. IIRC it's not quite that simple in that the type depends on the context that Perl thinks is current. I won't go into detail as this is not a Perl group but I found Perl horrible to work with. It is slick but also cryptic. James
[toc] | [prev] | [next] | [standalone]
| From | Ulli Horlacher <framstag@rus.uni-stuttgart.de> |
|---|---|
| Date | 2016-01-29 12:21 +0000 |
| Message-ID | <n8flfi$trr$1@news2.informatik.uni-stuttgart.de> |
| In reply to | #102225 |
James Harris <james.harris.1@gmail.com> wrote: > I nearly gave up with Python at the very beginning before I realised not > to mix tabs and spaces. I nearly gave up with Python at the very beginning before I realised that OO-programming is optional in Python! :-) Most tutorials I found so far makes OO mandatory. -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum IZUS/TIK E-Mail: horlacher@tik.uni-stuttgart.de Universitaet Stuttgart Tel: ++49-711-68565868 Allmandring 30a Fax: ++49-711-682357 70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
[toc] | [prev] | [next] | [standalone]
Page 1 of 4 [1] 2 3 4 Next page →
Back to top | Article view | comp.lang.python
csiph-web