Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Christian Gollwitzer
Am 17.02.18 um 06:12 schrieb Stefan Ram: Chris Angelico quotes: Python is relatively slow compared to programming languages that run closer to the operating system. The run time of the countdown example above is orders of magnitude faster when implemented in other language runtimes. What s

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Sat, Feb 17, 2018 at 12:54 AM, Chris Angelico wrote: > On Sat, Feb 17, 2018 at 5:25 PM, boB Stepp wrote: >> >> I am curious as to what efforts have been attempted to remove the GIL >> and what tradeoffs resulted and why? Is there a single article >> somewhere that collates this information?

Re: Python 2 to 3 Conversion

2018-02-16 Thread Ben Finney
Wildman via Python-list writes: > def get_ip_address(ifname): > s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > return socket.inet_ntoa(fcntl.ioctl( > s.fileno(), > 0x8915, # SIOCGIFADDR > struct.pack('256s', ifname[:15]) > )[20:24]) > print(get_ip_

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 5:25 PM, boB Stepp wrote: > I've just reread everyone's replies and one point you mentioned about > the GIL caught my eye ... > > On Fri, Feb 16, 2018 at 11:16 PM, Chris Angelico wrote: > >> Asynchronicity and concurrency are hard. Getting your head around a >> program tha

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
I've just reread everyone's replies and one point you mentioned about the GIL caught my eye ... On Fri, Feb 16, 2018 at 11:16 PM, Chris Angelico wrote: > Asynchronicity and concurrency are hard. Getting your head around a > program that is simultaneously doing two things is inherently tricky. >

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 4:11 PM, boB Stepp wrote: > On Fri, Feb 16, 2018 at 10:25 PM, Chris Angelico wrote: > >> >> 1) Type safety. >> >> This is often touted as a necessity for industrial-grade software. It >> isn't... > > Chris, would you mind expanding on this point? What is necessary for > i

Re: Python 2 to 3 Conversion

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 4:15 PM, Wildman via Python-list wrote: > I have a bit of code I found on the web that will return > the ip address of the named network interface. The code > is for Python 2 and it runs fine. But, I want to use the > code with Python 3. Below is the code followed by the

Python 2 to 3 Conversion

2018-02-16 Thread Wildman via Python-list
I have a bit of code I found on the web that will return the ip address of the named network interface. The code is for Python 2 and it runs fine. But, I want to use the code with Python 3. Below is the code followed by the error message. Suggestions appreciated. #!/usr/bin/env python3 import

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 3:54 PM, boB Stepp wrote: > On Fri, Feb 16, 2018 at 10:05 PM, Ben Finney > wrote: > >> He blithely conflates “weakly typed” (Python objects are not weakly, but >> very strongly typed) with “dynamically typed” (yes, Python's name >> binding is dynamically typed). Those are

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Fri, Feb 16, 2018 at 10:25 PM, Chris Angelico wrote: > > 1) Type safety. > > This is often touted as a necessity for industrial-grade software. It > isn't... Chris, would you mind expanding on this point? What is necessary for industrial-grade, safe, robust software? Do statically-typed lan

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 3:36 PM, Steven D'Aprano wrote: > Python is really good for gluing together high-performance but user- and > programmer-hostile scientific libraries written in C and Fortran. You > wouldn't write a serious, industrial-strength neural network in pure > Python code and expect

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Fri, Feb 16, 2018 at 10:05 PM, Ben Finney wrote: > He blithely conflates “weakly typed” (Python objects are not weakly, but > very strongly typed) with “dynamically typed” (yes, Python's name > binding is dynamically typed). Those are two, orthognal dimensions to > describe a language. > > All

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2018 21:22:48 -0600, boB Stepp wrote: > This article is written by Nathan Murthy, a staff software engineer at > Tesla. The article is found at: > https://medium.com/@natemurthy/all-the-things-i-hate-about- python-5c5ff5fda95e > > Apparently he chose his article title as "click ba

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 2:50 PM, Bill wrote: > boB Stepp wrote: >> >> This article is written by Nathan Murthy, a staff software engineer at >> Tesla. The article is found at: >> >> https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e >> >> Apparently he chose his articl

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 2:22 PM, boB Stepp wrote: > This article is written by Nathan Murthy, a staff software engineer at > Tesla. The article is found at: > https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e > > Apparently he chose his article title as "click bait".

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread MRAB
On 2018-02-17 03:22, boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e Apparently he chose his article title as "click bait". Apparently he does

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Ben Finney
boB Stepp writes: > https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e > As I currently do not have the necessary technical knowledge to > properly evaluate his claims, I thought I would ask those of you who > do. Thank you for asking. The author makes many mistakes.

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Bill
boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e Apparently he chose his article title as "click bait". Apparently he does not really hate Pytho

Click bait versus “rational and unbiased demeanor” (was: Are the critiques in "All the things I hate about Python" valid?)

2018-02-16 Thread Ben Finney
boB Stepp writes: > Apparently he chose his article title as "click bait". Apparently he > does not really hate Python (So he says.). Those may well be true. What I find implausible is his expressed desire: Ok, so “hate” is a strong word, but hopefully this click-baits enough folks int

Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e Apparently he chose his article title as "click bait". Apparently he does not really hate Python (So he says.). H

Re: How to run script from interpreter?

2018-02-16 Thread Ian Kelly
On Fri, Feb 16, 2018 at 3:18 PM, windhorn wrote: > Yes, it's been covered, but not quite to my satisfaction. > > Here's an example simple script: > > # Very simple script > bar = 123 > > I save this as "foo.py" somewhere Python can find it > import foo bar > Traceback (most recent call l

Re: Best site

2018-02-16 Thread mm0fmf
A. Because it spoils the flow. On 16/02/2018 20:07, Irving Duran wrote: Besides Google for sure. I liked www.codecademy.com Thank you, Irving Duran On 02/16/2018 11:53 AM, mm0fmf wrote: On 16/02/2018 16:04, dsujit2...@gmail.com wrote: which is the best site to learn python for data science.

Re: How to run script from interpreter?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 9:18 AM, windhorn wrote: > Yes, it's been covered, but not quite to my satisfaction. > > Here's an example simple script: > > # Very simple script > bar = 123 > > I save this as "foo.py" somewhere Python can find it > import foo bar > Traceback (most recent call l

How to run script from interpreter?

2018-02-16 Thread windhorn
Yes, it's been covered, but not quite to my satisfaction. Here's an example simple script: # Very simple script bar = 123 I save this as "foo.py" somewhere Python can find it >>> import foo >>> bar Traceback (most recent call last): File "", line 1, in NameError: name 'bar' is not defined #

Re: Best site

2018-02-16 Thread Irving Duran
Besides Google for sure. I liked www.codecademy.com Thank you, Irving Duran On 02/16/2018 11:53 AM, mm0fmf wrote: > On 16/02/2018 16:04, dsujit2...@gmail.com wrote: >> which is the best site to learn python for data science. >> > > Google. -- https://mail.python.org/mailman/listinfo/python-lis

Re: Best site

2018-02-16 Thread mm0fmf
On 16/02/2018 16:04, dsujit2...@gmail.com wrote: which is the best site to learn python for data science. Google. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to benchmark a HTTP connection with requests module?

2018-02-16 Thread Etienne Robillard
Hi Dennis, Here's my code so far: import os import requests import threading import time from Queue import Queue from test_support import unittest test_queue = Queue() def worker(ident, url, queue):     while True:     start = time.clock()     r = requests.get(url)     end = time

Best site

2018-02-16 Thread dsujit2208
which is the best site to learn python for data science. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to benchmark a HTTP connection with requests module?

2018-02-16 Thread Etienne Robillard
Hi Dennis, Nice pseudo code! :-) Is it possible benchmark/measure the latency of a HTTP connection for each threads by timing the duration of the requests.get method to complete? I also plan to test with gevent.monkey extension for enabling cooperative multithreading support: from gevent i