Request to Review: Tutorial about Python Packaging offering different use case

2023-12-13 Thread Christian Buhtz via Python-list
Hello, I would like to point to my Python Packaging Tutorial explaining several common use cases using minimal demo projects. I am not an expert and assume that some of my solutions might not be the best. So I would appreciate if you ca

Re: About Python Compressed Archive or Binaries

2022-01-18 Thread Sina Mobasheri
__ From: Python-list on behalf of Christian Heimes Sent: Tuesday, January 18, 2022, 18:29 To: python-list@python.org Subject: Re: About Python Compressed Archive or Binaries On 17/01/2022 18.49, Kirill Ratkin wrote: > It would be nice to have just zip file with python interpreter (not >

Re: About Python Compressed Archive or Binaries

2022-01-18 Thread Christian Heimes
On 17/01/2022 18.49, Kirill Ratkin wrote: It would be nice to have just zip file with python interpreter (not executable installer), unpack it anywhere, add path  to this 'anywhere' to PATH, and use it. Java/DotNet/Go have this option. But python - not. And question is - why? Java is develo

Re: About Python Compressed Archive or Binaries

2022-01-18 Thread Eryk Sun
On 1/17/22, Sina Mobasheri wrote: > > I'm aware that Python also have something called Embedded Zip for Windows > and nothing like that for Linux as far as I know, and I think this Embedded > Zip is not something that the user wants to work with that directly it's for > embedding in a C++ applicat

Re: About Python Compressed Archive or Binaries

2022-01-17 Thread Sina Mobasheri
That's exactly what I mean thank you 👌🏻🚀 From: Python-list on behalf of Kirill Ratkin Sent: Monday, January 17, 2022 9:19:44 PM To: python-list@python.org Subject: Re: About Python Compressed Archive or Binaries Hi, Yes, this is good question for Wi

Re: About Python Compressed Archive or Binaries

2022-01-17 Thread Kirill Ratkin
Hi, Yes, this is good question for Windows users. Of course, you can download installer exe-file -> do installation -> pack directory with python interpreter to zip (for example, or 7z) -> copy archive file to another place/computer and unpack. But it will not work out of box because origina

Re: About Python Compressed Archive or Binaries

2022-01-17 Thread Chris Angelico
On Tue, Jan 18, 2022 at 2:47 AM Chris Angelico wrote: > > On Tue, Jan 18, 2022 at 2:42 AM Sina Mobasheri > wrote: > > > > Java offers download JDK as Compressed Archive or NodeJS offers download > > Node as Binaries both give us a compressed file for Linux and windows that > > we can just unzip

Re: About Python Compressed Archive or Binaries

2022-01-17 Thread Chris Angelico
On Tue, Jan 18, 2022 at 2:42 AM Sina Mobasheri wrote: > > Java offers download JDK as Compressed Archive or NodeJS offers download Node > as Binaries both give us a compressed file for Linux and windows that we can > just unzipped it and put in a custom directory and set some environment > vari

About Python Compressed Archive or Binaries

2022-01-17 Thread Sina Mobasheri
Java offers download JDK as Compressed Archive or NodeJS offers download Node as Binaries both give us a compressed file for Linux and windows that we can just unzipped it and put in a custom directory and set some environment variables and start working I'm aware that Python also have somethi

Re: about python

2021-10-14 Thread Dan Stromberg
Please try to be more specific. What setup? What problem? On Thu, Oct 14, 2021 at 10:29 AM Amsalu Fentahun wrote: > there is a problem when I install the setup > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

about python

2021-10-14 Thread Amsalu Fentahun
there is a problem when I install the setup -- https://mail.python.org/mailman/listinfo/python-list

Re: Can anyone share experience about python backend developer?

2020-02-17 Thread DL Neil via Python-list
On 17/02/20 11:11 PM, lampahome wrote: I have 3+years developer experience in python, but I always develop about peer-to-peer service. Have no backend experience in python. But now I want to change to backend engineer, somebody shares their job is to do like 1. Develop customize API to receive d

Can anyone share experience about python backend developer?

2020-02-17 Thread lampahome
I have 3+years developer experience in python, but I always develop about peer-to-peer service. Have no backend experience in python. But now I want to change to backend engineer, somebody shares their job is to do like 1. Develop customize API to receive data from global 2. Develop tools with k8s

Re: Newbie question about Python syntax

2019-08-26 Thread Paul St George
On 25/08/2019 02:39, Cameron Simpson wrote: On 24Aug2019 21:52, Paul St George wrote: [snip]> Aside from "map" being a poor name (it is also a builtin Python function), it seems that one creates one of these to control how some rendering process is done. The class reference page you origina

Re: Newbie question about Python syntax

2019-08-24 Thread Cameron Simpson
On 24Aug2019 21:52, Paul St George wrote: Have you not got one of these handed to you from something? Or are you right at the outside with some "opaque" blender handle or something? (Disclaimer: I've never used Blender.) Thank you once again. If I understand your question, I am right outside

Re: Newbie question about Python syntax

2019-08-24 Thread Barry
Have you tried asking on a blender user mailing list for help with this problem? It seems that someone familiar with blender and its python interface should be able to help get you going. Barry > On 24 Aug 2019, at 20:52, Paul St George wrote: > >> On 24/08/2019 01:23, Cameron Simpson wrote:

Re: Newbie question about Python syntax

2019-08-24 Thread Paul St George
On 24/08/2019 01:23, Cameron Simpson wrote: On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So,

Re: Newbie question about Python syntax

2019-08-23 Thread Cameron Simpson
On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So, I want to look at the attribute of an instan

Re: Newbie question about Python syntax

2019-08-23 Thread Paul St George
On 22/08/2019 23:21, Kyle Stanley wrote: [snip] The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.org/3/tutorial/classes.html Section on instantiating objects from

Re: Newbie question about Python syntax

2019-08-22 Thread Kyle Stanley
> You are right, but it is even worse than you think. I do not have a tutorial so I have no examples to understand. The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 20:02, Terry Reedy wrote: On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: i

Re: Newbie question about Python syntax

2019-08-22 Thread Terry Reedy
On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.Composi

Re: Newbie question about Python syntax

2019-08-22 Thread Chris Angelico
On Thu, Aug 22, 2019 at 9:20 PM Paul St George wrote: > > On 22/08/2019 11:49, Cameron Simpson wrote: > > On 22Aug2019 09:34, Paul St George wrote: > >> I have the Python API for the Map Value Node here: > >> . > >> > >>

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 11:49, Cameron Simpson wrote: On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as:

Re: Newbie question about Python syntax

2019-08-22 Thread Cameron Simpson
On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy print(bpy.types.CompositorNodeMapVa

Newbie question about Python syntax

2019-08-22 Thread Paul St George
I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.CompositorNodeMapValue.max[0]) If this works, I will d

About: Python not recognizing command even after installed Python 3.7.3

2019-05-17 Thread Jpn Jha
Dear Team I have already installed python 3.7.3 64-bit in my window 8.1. I started learning Django using python. But after few days 4-5 days I found python not recognizing command. Could you please advise me. Is there any possibilities of Antivirous update and running for removing virous . Than

Re: hello this ali .. i want some question about python

2019-04-05 Thread Igor Korot
Hi, On Fri, Apr 5, 2019 at 9:02 PM Sayth Renshaw wrote: > > On Saturday, 6 April 2019 08:21:51 UTC+11, maak khan wrote: > > i need your help guys .. plz Are you trying to create a teaching software? Thank you. > > With? > -- > https://mail.python.org/mailman/listinfo/python-list -- https://m

hello this ali .. i want some question about python

2019-04-05 Thread maak khan
i need your help guys .. plz -- https://mail.python.org/mailman/listinfo/python-list

Re: hello this ali .. i want some question about python

2019-04-05 Thread Sayth Renshaw
On Saturday, 6 April 2019 08:21:51 UTC+11, maak khan wrote: > i need your help guys .. plz With? -- https://mail.python.org/mailman/listinfo/python-list

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

2018-02-26 Thread Ian Kelly
On Mon, Feb 26, 2018 at 8:55 PM, Ian Kelly wrote: > On Mon, Feb 26, 2018 at 8:09 PM, Steven D'Aprano > wrote: >> Yes you did: "the last second of every year" is always 23:59:59 of 31st >> December, and it is always the same time and date "every year". > > Except when it's 23:59:60 or 23:59:61 (wh

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

2018-02-26 Thread Chris Angelico
On Tue, Feb 27, 2018 at 2:55 PM, Ian Kelly wrote: > On Mon, Feb 26, 2018 at 8:09 PM, Steven D'Aprano > wrote: >> Yes you did: "the last second of every year" is always 23:59:59 of 31st >> December, and it is always the same time and date "every year". > > Except when it's 23:59:60 or 23:59:61 (wh

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

2018-02-26 Thread Chris Angelico
On Tue, Feb 27, 2018 at 12:18 PM, Rick Johnson wrote: > On Tuesday, February 20, 2018 at 5:45:36 PM UTC-6, Steven D'Aprano wrote: >> On Tue, 20 Feb 2018 12:42:23 -0800, Rick Johnson wrote: >> >> > For instance, if the age is queried many times a second, >> > it would be a much wiser design to set-

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

2018-02-26 Thread Ian Kelly
On Mon, Feb 26, 2018 at 8:09 PM, Steven D'Aprano wrote: > Yes you did: "the last second of every year" is always 23:59:59 of 31st > December, and it is always the same time and date "every year". Except when it's 23:59:60 or 23:59:61 (which hasn't yet happened but could). -- https://mail.python.

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

2018-02-26 Thread Steven D'Aprano
On Mon, 26 Feb 2018 17:18:38 -0800, Rick Johnson wrote: [...] > So, for instance: if your birthday is January 25th 1969, the last second > of the last day of your _first_ year is January 24th 1970 @ 11:59:59PM. > And the last second of the last day of your _second_ year is January > 24th 1971 @ 11

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

2018-02-26 Thread Steven D'Aprano
On Mon, 26 Feb 2018 17:18:38 -0800, Rick Johnson wrote: > On Tuesday, February 20, 2018 at 5:45:36 PM UTC-6, Steven D'Aprano > wrote: >> On Tue, 20 Feb 2018 12:42:23 -0800, Rick Johnson wrote: >> >> > For instance, if the age is queried many times a second, it would be >> > a much wiser design to

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

2018-02-26 Thread Rick Johnson
On Tuesday, February 20, 2018 at 5:45:36 PM UTC-6, Steven D'Aprano wrote: > On Tue, 20 Feb 2018 12:42:23 -0800, Rick Johnson wrote: > > > For instance, if the age is queried many times a second, > > it would be a much wiser design to set-up an event that > > will advance the age at the end of the l

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

2018-02-21 Thread Ian Kelly
On Tue, Feb 20, 2018 at 10:09 PM, Chris Angelico wrote: > On Wed, Feb 21, 2018 at 6:39 AM, Geldenhuys, J, Prof > wrote: >> I think your case illustrates the Python/Mathematica issue well: you found >> a job for which Mathematica was not the perfect tool and you used Python. >> At the end of

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

2018-02-21 Thread Michael F. Stemper
On 2018-02-18 22:55, Paul Rubin wrote: Steven D'Aprano writes: "positive odd integers greater than 10 but less than 15003 divisible by 17 except for 850, 867 and 1394; or primes that aren't Mersenne primes" It *could* be a type, if your type system was sufficiently flexible to allow you to

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

2018-02-21 Thread Michael F. Stemper
On 2018-02-18 22:55, Paul Rubin wrote: Steven D'Aprano writes: "positive odd integers greater than 10 but less than 15003 divisible by 17 except for 850, 867 and 1394; or primes that aren't Mersenne primes" It *could* be a type, if your type system was sufficiently flexible to allow you to

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

2018-02-21 Thread Richard Damon
On 2/20/18 3:51 PM, Chris Angelico wrote: On Wed, Feb 21, 2018 at 7:42 AM, Rick Johnson wrote: On Tuesday, February 20, 2018 at 2:18:31 PM UTC-6, MRAB wrote: The point he was making is that if you store a person's age, you'd have to update it every year. It's far better to store the date of b

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

2018-02-21 Thread Antoon Pardon
On 21-02-18 11:31, Terry Reedy wrote: > On 2/21/2018 3:15 AM, Antoon Pardon wrote: >> On 21-02-18 06:18, Terry Reedy wrote: >>> On 2/20/2018 8:38 AM, Antoon Pardon wrote: >>> People praise the dynamic nature of Python here on this list and then often enough seem to recoil when they see a

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

2018-02-21 Thread lorenzo . gatti
On Saturday, February 17, 2018 at 12:28:29 PM UTC+1, Ben Bacarisse wrote: > Marko Rauhamaa writes: > > > Many people think static typing is key to high quality. I tend to think > > the reverse is true: the boilerplate of static typing hampers > > expressivity so much that, on the net, quality suf

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

2018-02-21 Thread Terry Reedy
On 2/21/2018 3:15 AM, Antoon Pardon wrote: On 21-02-18 06:18, Terry Reedy wrote: On 2/20/2018 8:38 AM, Antoon Pardon wrote: People praise the dynamic nature of Python here on this list and then often enough seem to recoil when they see a piece of code really using that dynamism. ... When ma

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

2018-02-21 Thread Antoon Pardon
On 21-02-18 06:18, Terry Reedy wrote: > On 2/20/2018 8:38 AM, Antoon Pardon wrote: > >> People praise the dynamic nature of Python here on this list and then >> often enough seem to recoil when they see a piece of code really using >> that dynamism. > > ... > > When makes people recoil is abusing d

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

2018-02-21 Thread Antoon Pardon
On 21-02-18 05:13, Steven D'Aprano wrote: > On Tue, 20 Feb 2018 10:17:12 -0700, Ian Kelly wrote: > >> On Tue, Feb 20, 2018 at 8:38 AM, Steven D'Aprano >> wrote: >>> On Tue, 20 Feb 2018 15:23:44 +0100, Antoon Pardon wrote: >>> > Okay. Now create a constraint on a name in C++ such that it can on

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

2018-02-21 Thread Antoon Pardon
On 20-02-18 16:38, Steven D'Aprano wrote: > On Tue, 20 Feb 2018 15:23:44 +0100, Antoon Pardon wrote: > >>> Okay. Now create a constraint on a name in C++ such that it can only >>> accept integers representing A.D. years which, on the Gregorian >>> calendar, are leap years. (Using a dedicated intege

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

2018-02-20 Thread Terry Reedy
On 2/20/2018 8:38 AM, Antoon Pardon wrote: People praise the dynamic nature of Python here on this list and then often enough seem to recoil when they see a piece of code really using that dynamism. Dynamic typing is the addition of run-time type information (RTTI) to data values. This allow

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

2018-02-20 Thread Chris Angelico
On Wed, Feb 21, 2018 at 6:39 AM, Geldenhuys, J, Prof wrote: > I think your case illustrates the Python/Mathematica issue well: you found a > job for which Mathematica was not the perfect tool and you used Python. At > the end of the day, both M & P have their place. For example, we probably

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

2018-02-20 Thread Geldenhuys, J, Prof
inferior to Python? Marcel -Original Message- From: Python-list [mailto:python-list-bounces+mwild=sun.ac...@python.org] On Behalf Of bartc Sent: 19 February 2018 02:35 PM To: python-list@python.org Subject: Re: Are the critiques in "All the things I hate about P

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

2018-02-20 Thread Chris Angelico
On Wed, Feb 21, 2018 at 9:01 AM, Rick Johnson wrote: > On Tuesday, February 20, 2018 at 2:51:56 PM UTC-6, Chris Angelico wrote: > [...] >> Nope. Even if you need the age many times per second, it's still >> better to store the date of birth, because you eliminate boundary >> conditions and duplica

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 10:17:12 -0700, Ian Kelly wrote: > On Tue, Feb 20, 2018 at 8:38 AM, Steven D'Aprano > wrote: >> On Tue, 20 Feb 2018 15:23:44 +0100, Antoon Pardon wrote: >> Okay. Now create a constraint on a name in C++ such that it can only accept integers representing A.D. years wh

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 12:42:23 -0800, Rick Johnson wrote: > For instance, if the age is queried many times a second, it would be a > much wiser design to set-up an event that will advance the age at the > end of the last second of every year Do you really mean to say that everybody in the world has

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 22:19:13 +0100, Christian Gollwitzer wrote: [...] > LeapYearCheck could be implemented using template metaprogramming > (quite horrible) or the new funky constexpr feature in C++11/C++14 (less > horrible). Thanks Christian. That's certainly interesting, I don't know much about

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 17:11:05 +, Wild, Marcel, Prof wrote: > I scarcely know Python, and I have no intention delving into it further. > I was forced to use Python because it features binary decision > diagrams, which MATHEMATICA doesn't. Coming from Mathematica the > account of Nathan Murph

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

2018-02-20 Thread Rick Johnson
On Tuesday, February 20, 2018 at 2:51:56 PM UTC-6, Chris Angelico wrote: [...] > Nope. Even if you need the age many times per second, it's still > better to store the date of birth, because you eliminate boundary > conditions and duplicated data. You failed to provide any examples proving this as

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

2018-02-20 Thread Christian Gollwitzer
Am 20.02.18 um 14:58 schrieb Chris Angelico: Okay. Now create a constraint on a name in C++ such that it can only accept integers representing A.D. years which, on the Gregorian calendar, are leap years. (Using a dedicated integer-like type is permitted.) It must accept all multiples of four, exc

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

2018-02-20 Thread Chris Angelico
On Wed, Feb 21, 2018 at 7:42 AM, Rick Johnson wrote: > On Tuesday, February 20, 2018 at 2:18:31 PM UTC-6, MRAB wrote: > >> The point he was making is that if you store a person's age, you'd have >> to update it every year. It's far better to store the date of birth and >> calculate the age on dema

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

2018-02-20 Thread bartc
On 20/02/2018 20:17, MRAB wrote: On 2018-02-20 19:17, bartc wrote: On 20/02/2018 19:04, Dennis Lee Bieber wrote: On Tue, 20 Feb 2018 17:11:05 +, "Wild, Marcel, Prof " declaimed the following: So the special type of the values 65..90 might not allow the type be multiplied or divided, o

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

2018-02-20 Thread Rick Johnson
On Tuesday, February 20, 2018 at 2:18:31 PM UTC-6, MRAB wrote: > The point he was making is that if you store a person's age, you'd have > to update it every year. It's far better to store the date of birth and > calculate the age on demand. *AHEM* At the risk of being labeled a "quibbler" (wh

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

2018-02-20 Thread MRAB
On 2018-02-20 19:17, bartc wrote: On 20/02/2018 19:04, Dennis Lee Bieber wrote: On Tue, 20 Feb 2018 17:11:05 +, "Wild, Marcel, Prof " declaimed the following: So the special type of the values 65..90 might not allow the type be multiplied or divided, or added to itself. Because they rep

Re: Are the critiques in "All the things I hate about Python" valid? (Posting On Python-List Prohibited)

2018-02-20 Thread bartc
On 20/02/2018 19:35, Lawrence D’Oliveiro wrote: On Wednesday, February 21, 2018 at 1:43:41 AM UTC+13, bartc wrote: In Pascal (and presumably Ada) then all the gubbins need to make this work properly: var x: 1..10; x = 10; x = x + 1; { error? } Error on both statements. Pascal d

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

2018-02-20 Thread Grant Edwards
On 2018-02-20, Rhodri James wrote: > The schism is not as wide as you are implying. Aside from "print" > becoming a function, which is blindingly obvious whenever you trip over > it, there is relatively little reason why an ordinary Pythonista would > care whether he or she was running Python

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

2018-02-20 Thread bartc
On 20/02/2018 19:04, Dennis Lee Bieber wrote: On Tue, 20 Feb 2018 17:11:05 +, "Wild, Marcel, Prof " declaimed the following: So the special type of the values 65..90 might not allow the type be multiplied or divided, or added to itself. Because they represent characters A..Z. Or house n

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

2018-02-20 Thread Ben Finney
"Wild, Marcel, Prof " writes: > I scarcely know Python, and I have no intention delving into it > further. That's fine. This is a forum for those who do have an ongoing interest in Python. I think your needs would be better served elsewhere. -- \ “Prediction is very difficult, espec

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

2018-02-20 Thread Rhodri James
On 20/02/18 17:11, Wild, Marcel, Prof wrote: I scarcely know Python, and I have no intention delving into it further. I was forced to use Python because it features binary decision diagrams, which MATHEMATICA doesn't. Coming from Mathematica the account of Nathan Murphy reads like a nightmar

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

2018-02-20 Thread Richard Damon
> On Feb 20, 2018, at 8:58 AM, Chris Angelico wrote: > >> On Wed, Feb 21, 2018 at 12:53 AM, Antoon Pardon wrote: >> In C++ I can do something like: >> >> SomeClass MyVar; >> >> And after that the kind of possible assignments to MyVar are constraint. It >> makes the runtime throw an error wh

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

2018-02-20 Thread Rick Johnson
On Tuesday, February 20, 2018 at 9:40:37 AM UTC-6, Steven D'Aprano wrote: [...] > Yes you did: you refused to meet the challenge, stating (and I quote): I'm always entertained by Steven's so-called "challenges". You see, Steven is addicted to winning, and he'll do anything to win a debate, even co

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

2018-02-20 Thread Wild, Marcel, Prof
.org] On Behalf Of bartc Sent: 19 February 2018 02:35 PM To: python-list@python.org Subject: Re: Are the critiques in "All the things I hate about Python" valid? On 19/02/2018 02:59, Chris Angelico wrote: > On Mon, Feb 19, 2018 at 1:14 PM, bartc wrote: >> How would even a typ

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

2018-02-20 Thread Ian Kelly
On Tue, Feb 20, 2018 at 8:38 AM, Steven D'Aprano wrote: > On Tue, 20 Feb 2018 15:23:44 +0100, Antoon Pardon wrote: > >>> Okay. Now create a constraint on a name in C++ such that it can only >>> accept integers representing A.D. years which, on the Gregorian >>> calendar, are leap years. (Using a d

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 14:12:08 +0100, Anders Wegge Keller wrote: > På Tue, 20 Feb 2018 12:28:25 + (UTC) Steven D'Aprano > skrev: >> On Mon, 19 Feb 2018 16:34:29 +0100, Anders Wegge Keller wrote: >> >> > På Mon, 19 Feb 2018 15:15:19 + (UTC) Steven D'Aprano >> > skrev: >> >> On Mon, 19 Feb

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 15:23:44 +0100, Antoon Pardon wrote: >> Okay. Now create a constraint on a name in C++ such that it can only >> accept integers representing A.D. years which, on the Gregorian >> calendar, are leap years. (Using a dedicated integer-like type is >> permitted.) It must accept all

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

2018-02-20 Thread Antoon Pardon
On 20-02-18 14:58, Chris Angelico wrote: > On Wed, Feb 21, 2018 at 12:53 AM, Antoon Pardon wrote: >> In C++ I can do something like: >> >> SomeClass MyVar; >> >> And after that the kind of possible assignments to MyVar are constraint. It >> makes the runtime throw an error when somewhere the pro

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

2018-02-20 Thread Antoon Pardon
On 20-02-18 15:04, Paul Moore wrote: > On 20 February 2018 at 13:53, Antoon Pardon wrote: > >> You can't put such constraints on names in Python. > I know. That's what *I* said some time ago. So why did you bother complaining to me when I wrote it? -- https://mail.python.org/mailman/listinfo/p

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

2018-02-20 Thread Antoon Pardon
On 20-02-18 14:55, Chris Angelico wrote: > On Wed, Feb 21, 2018 at 12:38 AM, Antoon Pardon wrote: >> Why should this be done at compile time? I say a static language can do >> the same as a dynamic language and your counter point is to ask for how >> that static language can do something extra. >>

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

2018-02-20 Thread bartc
On 20/02/2018 13:38, Antoon Pardon wrote: People praise the dynamic nature of Python here on this list and then often enough seem to recoil when they see a piece of code really using that dynamism. Maybe everyone has their own ideas of how dynamic a language should be. (I use another languag

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

2018-02-20 Thread Paul Moore
On 20 February 2018 at 13:53, Antoon Pardon wrote: > You can't put such constraints on names in Python. I know. That's what *I* said some time ago. >> Sigh. Languages are different. That's my point. > > So, if languages are different, why the difficulty in accepting one can > do something the o

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

2018-02-20 Thread Chris Angelico
On Wed, Feb 21, 2018 at 12:53 AM, Antoon Pardon wrote: > In C++ I can do something like: > > SomeClass MyVar; > > And after that the kind of possible assignments to MyVar are constraint. It > makes the runtime throw an error when somewhere the program tries to assign > something to MyVar that is

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

2018-02-20 Thread Chris Angelico
On Wed, Feb 21, 2018 at 12:38 AM, Antoon Pardon wrote: > Why should this be done at compile time? I say a static language can do > the same as a dynamic language and your counter point is to ask for how > that static language can do something extra. > > The point I am making is that you claim dyna

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

2018-02-20 Thread Antoon Pardon
I'm not proficient with C++, but IIUC, you could make a class in C++ and have the constructor and copy operator check for these kind of things. True it would be run-time checks but that would already be more than Python can give. >>> That (run-time checks) is exactly the sa

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

2018-02-20 Thread Antoon Pardon
On 20-02-18 13:24, Steven D'Aprano wrote: > On Tue, 20 Feb 2018 12:18:47 +0100, Antoon Pardon wrote: > >> On 19-02-18 15:25, Steven D'Aprano wrote: Ones like C++ has already tied itself itself up in knots just doing the basics; I'm not sure how it would handle even my 1,3,5,7,9 type.

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

2018-02-20 Thread Paul Moore
On 20 February 2018 at 13:04, Antoon Pardon wrote: > On 20-02-18 13:11, Paul Moore wrote: >> On 20 February 2018 at 11:18, Antoon Pardon wrote: >>> Personnally I would prefer the type system of Pascal and Modula2 with >>> their interval type >>> above a Digit class in python. For the simple reaso

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

2018-02-20 Thread Anders Wegge Keller
På Tue, 20 Feb 2018 12:28:25 + (UTC) Steven D'Aprano skrev: > On Mon, 19 Feb 2018 16:34:29 +0100, Anders Wegge Keller wrote: > > > På Mon, 19 Feb 2018 15:15:19 + (UTC) Steven D'Aprano > > skrev: > >> On Mon, 19 Feb 2018 14:06:36 +0100, Anders Wegge Keller wrote: > >> > [...] > >>

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

2018-02-20 Thread Antoon Pardon
On 20-02-18 13:11, Paul Moore wrote: > On 20 February 2018 at 11:18, Antoon Pardon wrote: >> Personnally I would prefer the type system of Pascal and Modula2 with >> their interval type >> above a Digit class in python. For the simple reason that once you had >> declared a variable >> like this: >

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

2018-02-20 Thread bartc
On 20/02/2018 12:11, Paul Moore wrote: On 20 February 2018 at 11:18, Antoon Pardon wrote: There is no such possibility in Python. You can off course start with x = Digit(5), but the language won't stop you from doing x = 11 later. I'm not proficient with C++, but IIUC, you could make a cla

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

2018-02-20 Thread Steven D'Aprano
On Mon, 19 Feb 2018 16:34:29 +0100, Anders Wegge Keller wrote: > På Mon, 19 Feb 2018 15:15:19 + (UTC) Steven D'Aprano > skrev: >> On Mon, 19 Feb 2018 14:06:36 +0100, Anders Wegge Keller wrote: >> >> > Array is not even close to providing a strongly typed container. >> >> That's a mighty pow

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 12:18:47 +0100, Antoon Pardon wrote: > On 19-02-18 15:25, Steven D'Aprano wrote: >> >>> Ones like C++ has already tied itself itself up in knots just doing >>> the basics; I'm not sure how it would handle even my 1,3,5,7,9 type. >>> >>> But Python has classes and can do some of

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

2018-02-20 Thread Paul Moore
On 20 February 2018 at 11:18, Antoon Pardon wrote: > Personnally I would prefer the type system of Pascal and Modula2 with > their interval type > above a Digit class in python. For the simple reason that once you had > declared a variable > like this: > x: 1 .. 10; > > Each assignment to x wo

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

2018-02-20 Thread Antoon Pardon
On 19-02-18 15:25, Steven D'Aprano wrote: > >> Ones like C++ has already tied itself itself up in knots just doing the >> basics; I'm not sure how it would handle even my 1,3,5,7,9 type. >> >> But Python has classes and can do some of this stuff; how would it >> handle a numeric type that is constr

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

2018-02-20 Thread Ned Batchelder
On 2/20/18 5:47 AM, Antoon Pardon wrote: On 19-02-18 16:18, Ned Batchelder wrote: On 2/19/18 9:54 AM, Steven D'Aprano wrote: On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote: [1] The most basic question, which people making such claims often can't answer, is "Do you mean that values are s

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

2018-02-20 Thread Antoon Pardon
On 19-02-18 16:18, Ned Batchelder wrote: > On 2/19/18 9:54 AM, Steven D'Aprano wrote: >> On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote: >> >>> [1] The most basic question, which people making such claims often >>> can't >>> answer, is "Do you mean that values are strongly typed, or that name

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

2018-02-20 Thread Steven D'Aprano
On Tue, 20 Feb 2018 02:35:37 +1100, Chris Angelico wrote: > But C is a language saddled with so much history and backward > compatibility constraints that there are some things you just CAN'T make > into errors Indeed. C is not even close to a safe language, hence the move to create (and more i

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

2018-02-19 Thread breamoreboy
On Monday, February 19, 2018 at 1:07:02 PM UTC, Anders Wegge Keller wrote: > På Mon, 19 Feb 2018 04:39:31 + (UTC) > Steven D'Aprano skrev: > > On Mon, 19 Feb 2018 04:26:32 +0100, Anders Wegge Keller wrote: > > > > > På Mon, 19 Feb 2018 08:47:14 +1100 > > > Tim Delaney skrev: > > >> On 18 Feb

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

2018-02-19 Thread Rick Johnson
On Saturday, February 17, 2018 at 12:58:49 AM UTC-6, Paul Rubin wrote: [...] > Beyond that, the Python community (with some exceptions) seems to have a > widespread hatred of threads. It instead prefers to handle concurrent > i/o with in-thread async schemes that the rest of the world left behind

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

2018-02-19 Thread Rick Johnson
On Friday, February 16, 2018 at 10:25:32 PM UTC-6, Chris Angelico wrote: [...] > This is often touted as a necessity for industrial-grade > software. It isn't. There are many things that a type > system, no matter how sophisticated, cannot catch; for some > reason, though, we don't hear people sayi

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

2018-02-19 Thread Richard Damon
On 2/19/18 10:35 AM, Chris Angelico wrote: On Tue, Feb 20, 2018 at 12:34 AM, Steven D'Aprano wrote: On Mon, 19 Feb 2018 20:14:32 +1100, Chris Angelico wrote: As an integer, 3.141590 is 107853 $ Looks to me like C is perfectly happy to interpret a float as an int. Yes, but that's not an

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

2018-02-19 Thread Ned Batchelder
On 2/19/18 1:01 PM, Paul Moore wrote: On 19 February 2018 at 17:11, Ned Batchelder wrote: On 2/19/18 10:39 AM, Paul Moore wrote: I'm curious - How would you explain Python's "variables" to someone who knows how C variables work, in a way that ensures they don't carry across any unfortunate mis

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

2018-02-19 Thread Paul Moore
On 19 February 2018 at 17:11, Ned Batchelder wrote: > On 2/19/18 10:39 AM, Paul Moore wrote: >> >> I'm curious - How would you explain Python's "variables" to someone >> who knows how C variables work, in a way that ensures they don't carry >> across any unfortunate misconceptions based on how C w

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

2018-02-19 Thread Ned Batchelder
On 2/19/18 10:39 AM, Paul Moore wrote: On 19 February 2018 at 15:18, Ned Batchelder wrote: On 2/19/18 9:54 AM, Steven D'Aprano wrote: On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote: [1] The most basic question, which people making such claims often can't answer, is "Do you mean that va

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

2018-02-19 Thread Marko Rauhamaa
Paul Moore : > I'm curious - How would you explain Python's "variables" to someone > who knows how C variables work, in a way that ensures they don't carry > across any unfortunate misconceptions based on how C works? Just say that 1. Every Python variable is of the type "Object *". 2. Every

  1   2   3   4   5   6   7   8   9   10   >