Re: PEP 526 - var annotations and the spirit of python

2018-09-06 Thread Abdur-Rahmaan Janhangeer
hey, greetings, how did you come across this thread? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 526 - var annotations and the spirit of python

2018-09-06 Thread sjatkins
On Sunday, July 1, 2018 at 10:06:49 AM UTC-7, Abdur-Rahmaan Janhangeer wrote: > was viewing pep526, so, finally, python cannot do without hinting the type > as other languages? > will python finally move to > int x = 3 where int is a pre annotation? > > i am not arguing it's usefulness but

Re: PEP 526 - var annotations and the spirit of python

2018-07-17 Thread Peter J. Holzer
On 2018-07-15 08:37:05 +0200, Christian Gollwitzer wrote: > Am 05.07.18 um 12:04 schrieb Steven D'Aprano: > > On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: > > But... it compiles? Seriously? [...] > > Sometimes I wonder how C programmers manage to write a bug-free "Hello > >

Re: PEP 526 - var annotations and the spirit of python

2018-07-15 Thread Christian Gollwitzer
Am 05.07.18 um 12:04 schrieb Steven D'Aprano: On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: Am 04.07.18 um 17:31 schrieb Steven D'Aprano: On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: Presumably one type hint applies for the whole scope of the variable, not just the one

Re: PEP 526 - var annotations and the spirit of python

2018-07-06 Thread Steven D'Aprano
On Fri, 06 Jul 2018 09:42:09 +0200, Antoon Pardon wrote: > On 06-07-18 08:17, Steven D'Aprano wrote: >> On Thu, 05 Jul 2018 16:09:52 +0200, Antoon Pardon wrote: >> This is not an innovation of Mypy. It's how type inference is supposed to work. If a particular type checker doesn't do

Re: PEP 526 - var annotations and the spirit of python

2018-07-06 Thread Antoon Pardon
On 06-07-18 08:17, Steven D'Aprano wrote: > On Thu, 05 Jul 2018 16:09:52 +0200, Antoon Pardon wrote: > >>> This is not an innovation of Mypy. It's how type inference is supposed >>> to work. If a particular type checker doesn't do that, it is doing it >>> wrong. >> That is how type interference

Re: PEP 526 - var annotations and the spirit of python

2018-07-06 Thread Steven D'Aprano
On Thu, 05 Jul 2018 16:09:52 +0200, Antoon Pardon wrote: >> This is not an innovation of Mypy. It's how type inference is supposed >> to work. If a particular type checker doesn't do that, it is doing it >> wrong. > > That is how type interference works in languages that have some kind of >

RE: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Schachner, Joseph
on-list@python.org Subject: Re: PEP 526 - var annotations and the spirit of python On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: > Presumably one type hint applies for the whole scope of the variable, > not just the one assignment. You know how in C you can write int x = 1;

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Antoon Pardon
On 05-07-18 15:07, Steven D'Aprano wrote: > On Thu, 05 Jul 2018 13:54:28 +0200, Antoon Pardon wrote: > >> On 05-07-18 11:59, Steven D'Aprano wrote: >>> On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: >>> >>> > Indeed, that's often the best way, except for the redundant type >

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 13:54:28 +0200, Antoon Pardon wrote: > On 05-07-18 11:59, Steven D'Aprano wrote: >> On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: >> >> Indeed, that's often the best way, except for the redundant type hint, which makes you That Guy: x: int =

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Bart
On 05/07/2018 11:04, Steven D'Aprano wrote: On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: Not sure what point you are trying to make, but your example compiles in C, if you replace the '#' comment sign with '//'. Sometimes I wonder how C programmers manage to write a

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Mark Lawrence
On 05/07/18 11:26, Bart wrote: And at numerous other languages that are properly statically typed (Ada being one of the most rigorous, while C++ is a nightmare). I had to chuckle at that as friends of mine have had great fun rewriting Ada in C++ as it was just too damn slow. This was

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Antoon Pardon
On 05-07-18 11:59, Steven D'Aprano wrote: > On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: > > >>> Indeed, that's often the best way, except for the redundant type hint, >>> which makes you That Guy: >>> >>> x: int = 0 # set x to the int 0 >> But you've shown in an earlier example

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Bart
On 05/07/2018 10:59, Steven D'Aprano wrote: But it is redundant in *that* example. Your hint is not giving any more information that what the reader, or type checker, can already infer. These are useful: x: Any = 3 # x can be anything, but is currently an int x: int = None # x can

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: > Am 04.07.18 um 17:31 schrieb Steven D'Aprano: >> On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: >> >>> Presumably one type hint applies for the whole scope of the variable, >>> not just the one assignment. >> >> You know how in

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Thu, 05 Jul 2018 17:34:55 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: > >> but the type checker should infer that if you assign None to a variable >> which is declared int, you must have meant Optional[int] rather than >> just int. > > This seems to be equivalent to saying that

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Abdur-Rahmaan Janhangeer
he means too much of it Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Well you always mention how like english the if-expression in python is and > thus by implication readable. > > -- > Antoon. > > -- > https://mail.python.org/mailman/listinfo/python-list > --

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Antoon Pardon
On 05-07-18 08:58, Steven D'Aprano wrote: > >> Optimize for readability, not writability. > And that is why we all hold COBOL up as the paragon of excellence for a > programming language! *wink* > > Or if you don't like COBOL, how about Hypertalk? Well you always mention how like english the

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Christian Gollwitzer
Am 04.07.18 um 17:31 schrieb Steven D'Aprano: On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: Presumably one type hint applies for the whole scope of the variable, not just the one assignment. You know how in C you can write int x = 1; # the type applies for just this one assignment

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Chris Angelico
On Thu, Jul 5, 2018 at 4:58 PM, Steven D'Aprano wrote: >> Optimize for readability, not writability. > > And that is why we all hold COBOL up as the paragon of excellence for a > programming language! *wink* > > Or if you don't like COBOL, how about Hypertalk? > > put 42 into x > ask file "Which

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Steven D'Aprano
On Wed, 04 Jul 2018 13:26:03 -0600, Ian Kelly wrote: [...] >> Note that None is a special case (because sometimes special cases *are* >> special enough to break the rules). > > > I don't think this case is special enough. As a person coming along > later and trying to read the code, I should be

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Abdur-Rahmaan Janhangeer
*you know x should still an int after these two statements, because the type hint says so. Without it:x = 3x = f(x)x could be anything.* *...* *If something is an int, then make it an int:x: int = 0* i'm not arguing about it being useful or not but rather people turn to python to

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Gregory Ewing
Steven D'Aprano wrote: but the type checker should infer that if you assign None to a variable which is declared int, you must have meant Optional[int] rather than just int. This seems to be equivalent to saying that *all* types are Optional, in which case what point is there in having

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Steven D'Aprano
On Wed, 04 Jul 2018 19:57:12 +0100, Bart wrote: > On 04/07/2018 16:31, Steven D'Aprano wrote: >> On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: > >> Of course the type (whether inferred or annotated) applies for the >> entire scope of that variable. >> >> > In that case I don't understand

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Ian Kelly
On Wed, Jul 4, 2018, 9:36 AM Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: > >> A better example would be: > >> > >> x: int = None > >> > >> which ought to be read as "x is an int, or None, and it's currently > >> None". > >

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Bart
On 04/07/2018 16:31, Steven D'Aprano wrote: On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: Of course the type (whether inferred or annotated) applies for the entire scope of that variable. In that case I don't understand what you're complaining about. You say that hinting is not needed

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Steven D'Aprano
On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: > Presumably one type hint applies for the whole scope of the variable, > not just the one assignment. You know how in C you can write int x = 1; # the type applies for just this one assignment x = 2.5;# perfectly legal, right?

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Mark Lawrence
On 04/07/18 05:55, Jim Lee wrote: On 07/03/18 21:25, Ben Finney wrote: Jim Lee writes: On 07/03/18 19:58, Ben Finney via Python-list wrote: Jim Lee writes: If you were to say John had 2 apples, Jane had 4 apples, and Joe had an indefinite number of apples, how many numbers are we

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Bart
On 04/07/2018 06:52, Steven D'Aprano wrote: On Sun, 01 Jul 2018 17:22:43 -0500, Tim Daneliuk wrote: x: int = 3 [...] This strikes me as syntactic noise. Python is dynamically typed and will remain so. Why clutter the language - even optionally - with stuff like this? There's no need to

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Gregory Ewing
Ben Finney wrote: Abdur-Rahmaan Janhangeer writes: […] *cut at this point* Ooh, I like that last step! How do we make that happen on demand? You mention that Nazis ate fish. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Gregory Ewing
Grant Edwards wrote: On 2018-07-03, Dan Stromberg wrote: I used to write useful programs that ran in 256 bytes of RAM. Me too. The hex monitor I wrote for the keypad/display on my first computer fitted in 256 bytes. Which was important, seeing as the whole machine only had 1.5k. -- Greg

Re: Infinity [was Re: PEP 526 - var annotations and the spirit of python]

2018-07-04 Thread Chris Angelico
On Wed, Jul 4, 2018 at 3:37 PM, Steven D'Aprano wrote: > On Wed, 04 Jul 2018 12:31:16 +1000, Chris Angelico wrote: > > [...] >>> Ah, I see we're not going to leave it alone. In that case, >>> "indefinite" >>> is a "number", in that it was a quantity you cited along with the other >>> two. If

Re: PEP 526 - var annotations and the spirit of python

2018-07-04 Thread Steven D'Aprano
On Tue, 03 Jul 2018 19:28:43 -0700, Jim Lee wrote: > On 07/03/18 16:51, Steven D'Aprano wrote: >> >> I love watching pedantically precise people panic and dig themselves >> into a hole. Since I'm an extremely pedantic person myself, I can >> recognise it in others -- especially when they're not

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Sun, 01 Jul 2018 17:22:43 -0500, Tim Daneliuk wrote: >> x: int = 3 [...] > This strikes me as syntactic noise. Python is dynamically typed and > will remain so. Why clutter the language - even optionally - with stuff > like this? There's no need to declare x:int = 3 since any linter worth

Infinity [was Re: PEP 526 - var annotations and the spirit of python]

2018-07-03 Thread Steven D'Aprano
On Wed, 04 Jul 2018 12:31:16 +1000, Chris Angelico wrote: [...] >> Ah, I see we're not going to leave it alone. In that case, >> "indefinite" >> is a "number", in that it was a quantity you cited along with the other >> two. If you'd prefer to call it a "quantity", that's fine with me. >> Talk

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 22:03, Ben Finney wrote: Jim Lee writes: I claimed that Steven was using three different numbers to refer to the time it takes to master a subject: 10,000 hours an indefinite number 2 years Yes. He did so in the context of showing that *there is no precise number* that

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney
Jim Lee writes: > I claimed that Steven was using three different numbers to refer to > the time it takes to master a subject: > > 10,000 hours > an indefinite number > 2 years Yes. He did so in the context of showing that *there is no precise number* that universally applies for the amount of

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 21:35, Ben Finney wrote: Abdur-Rahmaan Janhangeer writes: apart from programming, other questions go like this : […] *cut at this point* Ooh, I like that last step! How do we make that happen on demand? You could start by not adding to the noise... :) --

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 21:25, Ben Finney wrote: Jim Lee writes: On 07/03/18 19:58, Ben Finney via Python-list wrote: Jim Lee writes: If you were to say John had 2 apples, Jane had 4 apples, and Joe had an indefinite number of apples, how many numbers are we talking about? Three numbers. And

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Abdur-Rahmaan Janhangeer
conversation dies it denotes the end of the picture i was painting Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney
Abdur-Rahmaan Janhangeer writes: > apart from programming, other questions go like this : > > […] > *cut at this point* Ooh, I like that last step! How do we make that happen on demand? -- \ “Everything you read in newspapers is absolutely true, except | `\for that rare story

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Abdur-Rahmaan Janhangeer
list members have a nice way to wriggle out of the subject ^^_ apart from programming, other questions go like this : asker : what do you think about this python thing? next post : *on track* next post : *on track* next post : *on track* btw thon is the name of a fish in french next post :

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney
Jim Lee writes: > On 07/03/18 19:58, Ben Finney via Python-list wrote: > > Jim Lee writes: > > > >> If you were to say John had 2 apples, Jane had 4 apples, and Joe had > >> an indefinite number of apples, how many numbers are we talking about? > > Three numbers. And “indefinite” is not one of

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 19:58, Ben Finney via Python-list wrote: Jim Lee writes: If you were to say John had 2 apples, Jane had 4 apples, and Joe had an indefinite number of apples, how many numbers are we talking about? Three numbers. And “indefinite” is not one of those numbers. So, no, that doesn't

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney via Python-list
Jim Lee writes: > If you were to say John had 2 apples, Jane had 4 apples, and Joe had > an indefinite number of apples, how many numbers are we talking about? Three numbers. And “indefinite” is not one of those numbers. So, no, that doesn't support “"indefinite" is a number”. -- \

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 19:31, Chris Angelico wrote: I've had debates with people about whether "infinity" is a number or not, but I've never yet heard anyone say that "indefinite" is a number. Hmm. This could be interesting. ChrisA If you were to say John had 2 apples, Jane had 4 apples, and Joe had

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Chris Angelico
On Wed, Jul 4, 2018 at 12:28 PM, Jim Lee wrote: > > > On 07/03/18 16:51, Steven D'Aprano wrote: >> >> >> I love watching pedantically precise people panic and dig themselves into >> a hole. Since I'm an extremely pedantic person myself, I can recognise it >> in others -- especially when they're

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 16:51, Steven D'Aprano wrote: I love watching pedantically precise people panic and dig themselves into a hole. Since I'm an extremely pedantic person myself, I can recognise it in others -- especially when they're not as precisely correct as they think they're being. It was two

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Tue, 03 Jul 2018 09:14:37 -0700, Jim Lee wrote: > On 07/03/18 01:34, Steven D'Aprano wrote: >> I said *indefinite* not infinite. > > Yes, you did.  My bad. Thanks Jim, your acknowledgement is appreciated. >> You did read the article I linked to, right? You know that people don't >>

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 06:32, Dennis Lee Bieber wrote: On Mon, 2 Jul 2018 19:51:29 -0500, Tim Daneliuk declaimed the following: Except that the current attempt is to use techniques like agile, scrum, pair programming, and so forth to turn programming into a factory activity. High degrees of

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Grant Edwards
On 2018-07-03, Steven D'Aprano wrote: > On Tue, 03 Jul 2018 14:24:26 +, Grant Edwards wrote: >> On 2018-07-03, Dan Stromberg wrote: >> >>> I used to write useful programs that ran in 256 bytes of RAM. >> >> Me too. >> >> Less than 10 years ago. >> >> In a real product. >> >> That's

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 01:34, Steven D'Aprano wrote: I said *indefinite* not infinite. Yes, you did.  My bad. You did read the article I linked to, right? You know that people don't suddenly and instantly turn from "beginner" to "expert" when they exceed 9,999 hours 59 minutes and 59 seconds?

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Tue, 03 Jul 2018 14:24:26 +, Grant Edwards wrote: > On 2018-07-03, Dan Stromberg wrote: > >> I used to write useful programs that ran in 256 bytes of RAM. > > Me too. > > Less than 10 years ago. > > In a real product. > > That's still shipping. Well don't be shy. Got a link? --

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Gene Heskett
On Tuesday 03 July 2018 09:32:52 Dennis Lee Bieber wrote: > On Mon, 2 Jul 2018 19:51:29 -0500, Tim Daneliuk > > declaimed the following: > >Except that the current attempt is to use techniques like agile, > >scrum, pair programming, and so forth to turn programming into > >a factory activity.

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Grant Edwards
On 2018-07-03, Dan Stromberg wrote: > I used to write useful programs that ran in 256 bytes of RAM. Me too. Less than 10 years ago. In a real product. That's still shipping. -- Grant Edwards grant.b.edwardsYow! Are you mentally here

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Bart
On 01/07/2018 18:06, Abdur-Rahmaan Janhangeer wrote: was viewing pep526, so, finally, python cannot do without hinting the type as other languages? will python finally move to int x = 3 where int is a pre annotation? i am not arguing it's usefulness but rather, does it fit with python? Not in

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Chris Angelico
On Tue, Jul 3, 2018 at 6:34 PM, Steven D'Aprano wrote: > Or as my wife would say, "did you mean an Aussie couple or an actual > couple?" I meant an Aussie couple, which could be anything from two to > four or five. Six at a stretch. As in, "no worries mate, it'll be ready > in a coupla days." cf

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Mon, 02 Jul 2018 18:20:53 -0700, Jim Lee wrote: > On 07/02/18 17:51, Steven D'Aprano wrote: >> >> For most of us mere mortals, the "ten thousand hours" rule of thumb >> applies. >> >> Ten thousand hours should be read as an indefinitely large number >> >>> A truly good programmer will be able

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Gregory Ewing
Steven D'Aprano wrote: "Jack of all trades, master of none" sort of thing? Or are you thinking more along the lines of one of those guys who masters a new language in an hour and reaches expert level in a week? I'm not talking about someone who hasn't mastered anything. I'm talking about

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Dan Stromberg
On Mon, Jul 2, 2018 at 5:51 PM, Tim Daneliuk wrote: > In particular, there is little interest in having programmers > learn on the job, only that they be as productive as possible > as fast they can. Hiring specific languages skills - the theory > goes - means that the individual will be

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Dan Stromberg
On Mon, Jul 2, 2018 at 6:10 PM, Jim Lee wrote: > On 07/02/18 17:34, Dan Stromberg wrote: > > The fact of the matter is the economics have changed a lot since then. > Machine time used to be really expensive compared to developer time. > Today, it's the opposite: developer time is really

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Tim Daneliuk
On 07/02/2018 06:22 PM, Gregory Ewing wrote: > A > truly good programmer will be able to learn about the language > being used on the job. Except that the current attempt is to use techniques like agile, scrum, pair programming, and so forth to turn programming into a factory activity. High

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Jim Lee
On 07/02/18 17:51, Steven D'Aprano wrote: For most of us mere mortals, the "ten thousand hours" rule of thumb applies. Ten thousand hours should be read as an indefinitely large number A truly good programmer will be able to learn about the language being used on the job. Indeed, if you

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Jim Lee
On 07/02/18 17:34, Dan Stromberg wrote: The fact of the matter is the economics have changed a lot since then. Machine time used to be really expensive compared to developer time.  Today, it's the opposite: developer time is really expensive compared to machine time. If you go back

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Steven D'Aprano
On Tue, 03 Jul 2018 11:22:56 +1200, Gregory Ewing wrote: > Someone who is familiar with a > variety of languages is also very likely to be self-motivated and have > enough passion and curiosity to have acquired a broad and deep knowledge > of other aspects of the craft. "Jack of all trades,

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Dan Stromberg
On Sun, Jul 1, 2018 at 8:51 PM, Jim Lee wrote: > Languages that used to be small, lean, and exceptional at doing things > really well in a given domain have morphed into large, monolithic, bloated > language *systems* that do many things in many domains, and have many ways > to do the *same*

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Jim Lee
On 07/02/18 16:22, Gregory Ewing wrote: Ian Kelly wrote: Just because somebody knows a dozen languages doesn't mean that they can come up with the correct algorithm, That doesn't mean there's no correlation. Someone who is familiar with a variety of languages is also very likely to be

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Gregory Ewing
Ian Kelly wrote: Just because somebody knows a dozen languages doesn't mean that they can come up with the correct algorithm, That doesn't mean there's no correlation. Someone who is familiar with a variety of languages is also very likely to be self-motivated and have enough passion and

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Ian Kelly
On Sun, Jul 1, 2018 at 10:53 PM Jim Lee wrote: > I did get one epiphany out of that. He's right - there are orders of > magnitude more programmers today than there were a couple of decades ago > - and they ARE almost all entry level, in that they are fluent in only > one (maybe two) languages.

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Jim Lee
On 07/02/18 04:01, Steven D'Aprano wrote: On Sun, 01 Jul 2018 20:51:42 -0700, Jim Lee wrote: Back before the dot com boom, programmers (generally) knew at least 6, 7, 8 languages. You obviously didn't know (m)any of the hundreds of thousands of COBOL programmers.   I did know a handful,

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Tim Daneliuk
On 07/01/2018 12:17 PM, MRAB wrote: > On 2018-07-01 18:06, Abdur-Rahmaan Janhangeer wrote: >> was viewing pep526, so, finally, python cannot do without hinting the type >> as other languages? >> will python finally move to >> int x = 3 where int is a pre annotation? >> >> i am not arguing it's

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Grant Edwards
On 2018-07-02, Steven D'Aprano wrote: > In the long run, why do we always fear people coming from other > languages? Tribalism and fear of outsiders was bred into H. sapiens (and ancestors) millions of years ago? -- Grant Edwards grant.b.edwardsYow! My Aunt MAUREEN was

Re: PEP 526 - var annotations and the spirit of python

2018-07-02 Thread Steven D'Aprano
On Sun, 01 Jul 2018 20:51:42 -0700, Jim Lee wrote: > Back before the dot com boom, programmers (generally) knew at least 6, > 7, 8 languages. You obviously didn't know (m)any of the hundreds of thousands of COBOL programmers. (A language conspicuous by its absence from your impressively large

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Abdur-Rahmaan Janhangeer
me too i come from "other languages" but what i liked in python was python now the world got mixed up again Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ In the long run, why do we always fear people coming from other > languages? Why don't they fear Python programmers coming to

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Jim Lee
On 07/01/18 18:21, Steven D'Aprano wrote: Guido has been talking about this for a LONG time: You keep bringing that up.  It's not an argument. People have been talking about taxes for a long, long time.  Does it surprise you that they still do?  None of us has a time machine that will

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Steven D'Aprano
On Sun, 01 Jul 2018 22:48:00 +0400, Abdur-Rahmaan Janhangeer wrote: > not python, the spirit of python, > > i guess i must have been around when it was first discussed, now it's > too late to discuss why it was introduced in the first place ... Guido has been talking about this for a LONG time:

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Steven D'Aprano
On Sun, 01 Jul 2018 21:55:21 +0400, Abdur-Rahmaan Janhangeer wrote: > i meant that x: int = 3 is dangerously close to int x = 3, > > in the long run, you'll come across people who come from other languages > wanting to java/c style their code and end up sprinkling a lot of these, > it'll be a

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Abdur-Rahmaan Janhangeer
not python, the spirit of python, i guess i must have been around when it was first discussed, now it's too late to discuss why it was introduced in the first place ... Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ I'm sure people will misuse type hints too. What of it? Does it >

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Chris Angelico
On Mon, Jul 2, 2018 at 3:55 AM, Abdur-Rahmaan Janhangeer wrote: > i meant that x: int = 3 is dangerously close to int x = 3, > > in the long run, you'll come across people who come from other languages > wanting to java/c style their code and end up sprinkling a lot of these, > it'll be a sad day

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Abdur-Rahmaan Janhangeer
i meant that x: int = 3 is dangerously close to int x = 3, in the long run, you'll come across people who come from other languages wanting to java/c style their code and end up sprinkling a lot of these, it'll be a sad day for me return type in function definition also managed to return via ->

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Ian Kelly
On Sun, Jul 1, 2018 at 11:09 AM Abdur-Rahmaan Janhangeer wrote: > > was viewing pep526, so, finally, python cannot do without hinting the type > as other languages? Python certainly can do without it. That's why it's an optional feature with no runtime effect beyond making the annotations

Re: PEP 526 - var annotations and the spirit of python

2018-07-01 Thread MRAB
On 2018-07-01 18:06, Abdur-Rahmaan Janhangeer wrote: was viewing pep526, so, finally, python cannot do without hinting the type as other languages? will python finally move to int x = 3 where int is a pre annotation? i am not arguing it's usefulness but rather, does it fit with python? PEP

PEP 526 - var annotations and the spirit of python

2018-07-01 Thread Abdur-Rahmaan Janhangeer
was viewing pep526, so, finally, python cannot do without hinting the type as other languages? will python finally move to int x = 3 where int is a pre annotation? i am not arguing it's usefulness but rather, does it fit with python? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ --