Re: sigmoid function and derivative

2018-06-26 Thread Terry Reedy
On 6/26/2018 11:26 PM, Sharan Basappa wrote: Folks, I know this is not a machine learning forum but I wanted to see if anyone can explain this to me. In artificial neural network, I can understand why sigmoid is used but I see that derivative of sigmoid output function is used. I am not able

sigmoid function and derivative

2018-06-26 Thread Sharan Basappa
Folks, I know this is not a machine learning forum but I wanted to see if anyone can explain this to me. In artificial neural network, I can understand why sigmoid is used but I see that derivative of sigmoid output function is used. I am not able to understand why. For example: # convert out

Re: syntax difference

2018-06-26 Thread Gregory Ewing
Bart wrote: I don't know whether there is a direct equivalent in Python (I thought somebody would point it out) Not built-in, but a tiny bit of googling turns this up: https://pypi.org/project/bitarray/ "This module provides an object type which efficiently represents an array of booleans. B

Re: I'm getting a spamassassin party here

2018-06-26 Thread Cameron Simpson
On 27Jun2018 08:55, Cameron Simpson wrote: On closer inspection it looks like a FIDONET gateway may be the cause. I've made enquiries of ab...@news.bbs.nz and newsmas...@news.bbs.nz, and am awaiting a response. I've also asked at Castle Rock BBS, based on a different header. Cheers, Cameron

Re: syntax difference

2018-06-26 Thread Gregory Ewing
Bart wrote: x = set(range(10_000_000)) This used up 460MB of RAM (the original 100M I tried exhausted the memory). The advantage of Pascal-style sets is that that same set will occupy only 1.25MB, as it is a bit-map. That's true, but they're also extremely limited compared to the things y

Re: I'm getting a spamassassin party here

2018-06-26 Thread Gregory Ewing
Cameron Simpson wrote: > I've been noticing a swathe of messages in the past few days with From: > headers like this: > > From: "Steven D'Aprano" In comp.lang.python I'm seeing repeats of messages that were posted 2 or 3 days ago, with these mangled addresses. -- Greg -- https://mail.python.or

Re: I'm getting a spamassassin party here

2018-06-26 Thread Cameron Simpson
On 26Jun2018 07:44, Richard Damon wrote: On 6/26/18 2:50 AM, Cameron Simpson wrote: On 24Jun2018 17:03, Gene Heskett wrote: Generally spamassassin only gets picky about this occasionally, but for the past several hours its working overtime on python list messages, with the major problem being

Re: Where's the junk coming from?

2018-06-26 Thread Cameron Simpson
On 25Jun2018 18:37, Mark Lawrence wrote: More of the flaming things, this time name@1261/38.remove-ij1-this. Any ideas as I don't understand this stuff? Looks like a FIDONET gateway leaking somehow. I've made an enquiry to a possible source for the message, we'll see what transpires. Cheer

[ANN] PyYAML-4.1: YAML parser and emitter for Python

2018-06-26 Thread Ingy dot Net
=== Announcing PyYAML-4.1 === A new MAJOR RELEASE of PyYAML is now available: https://pypi.org/project/PyYAML/ This is the first release of PyYAML under a new maintenance team. In August 2016, maintenance of PyYAML and LibYAML was turned over from the orig

Re: syntax difference

2018-06-26 Thread Mark Lawrence
On 26/06/18 12:39, Chris Angelico wrote: On Tue, Jun 26, 2018 at 9:30 PM, Bart wrote: On 19/06/2018 11:33, Steven D'Aprano wrote: On Tue, 19 Jun 2018 10:19:15 +0100, Bart wrote: * Integer sets (Pascal-like sets) Why do you need them if you have real sets? I tried Python sets for the f

Re: Where's the junk coming from?

2018-06-26 Thread José María Mateos
On Mon, Jun 25, 2018, at 13:37, Mark Lawrence wrote: > More of the flaming things, this time name@1261/38.remove-ij1-this. Any > ideas as I don't understand this stuff? I've contacted the list admin about this. It doesn't seem like it's going to go away on its own. I just received another batch

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Mark Lawrence
From: Mark Lawrence On 25/06/18 17:15, jkn wrote: > On Monday, June 25, 2018 at 4:23:57 PM UTC+1, Chris Angelico wrote: >> On Mon, Jun 25, 2018 at 11:15 PM, jkn wrote: >>> (as well as pedanticism ;-o). >> >> Pedantry. >> >> ChrisA >> (You know I can't let that one pass.) > > I was chanel[l]ing t

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Mark Lawrence
From: Mark Lawrence On 25/06/18 10:10, Alister via Python-list wrote: > On Mon, 25 Jun 2018 11:36:25 +0400, Abdur-Rahmaan Janhangeer wrote: > >> i think he means like for a loop to iterate over a list you might do >> >> list = [1,2,3] >> for i in range(len(list)): >> print(list[i]) >> >> >>

Where's the junk coming from?

2018-06-26 Thread Mark Lawrence
From: Mark Lawrence Hi folks, In the last hour or so I've seen via thunderbird and gmane around 15 emails from various people where the from field is name@1261/38.remove-r7u-this. The part after the @ symbol never changes. I've seen the contents previously, apart from one from the RUE. Users'

Re: Anyone here on Python-Dev mailing list?

2018-06-26 Thread Mark Lawrence
From: Mark Lawrence On 24/06/18 17:07, Steven D'Aprano wrote: > Anyone on the Python-Dev mailing list, are you getting private emails > containing nothing but stream of consciousness word-salad from somebody > (some bot?) calling himself "Chanel Marvin" with a gmail address? > > Typical example:

Re: syntax difference

2018-06-26 Thread Mark Lawrence
From: Mark Lawrence On 24/06/18 00:44, boB Stepp wrote: > I imagine that the > transition from version 2 to 3 was not undertaken halfheartedly, but > only after much thought and discussion since it did break backwards > compatibility. > So much so that a specific mailing list was set up just to

Re: moving to Python from Java/C++/C

2018-06-26 Thread Chris Angelico
From: Chris Angelico On Tue, Jun 26, 2018 at 2:35 AM, Dan Stromberg wrote: > On Mon, Jun 25, 2018 at 3:40 AM, wrote: > >> Hey, >> I already have quite an experience in programming, and I wish to study >> Python as well. I need to study it before I continue with my comp. science >> academic stud

Re: I'm getting a spamassassin party here

2018-06-26 Thread Vincent Vande Vyvre
Le 26/06/18 à 15:50, Gene Heskett a écrit : On Tuesday 26 June 2018 02:50:01 Cameron Simpson wrote: On 24Jun2018 17:03, Gene Heskett wrote: Greetings list; Generally spamassassin only gets picky about this occasionally, but for the past several hours its working overtime on python list messa

Re: syntax difference

2018-06-26 Thread Bart
To: boB Stepp From: "Bart" To: boB Stepp From: Bart On 24/06/2018 16:37, boB Stepp wrote: > On Sun, Jun 24, 2018 at 5:21 AM Bart wrote: > "... And of course, you would have to know how to use Python properly in > idiomatic style. No. I want to program in /my/ style, one more like the pse

Re: syntax difference

2018-06-26 Thread Bart
To: Chris Angelico From: "Bart" To: Chris Angelico From: Bart On 24/06/2018 15:46, Chris Angelico wrote: > On Sun, Jun 24, 2018 at 8:40 PM, Steven D'Aprano > wrote: >> On Sun, 24 Jun 2018 11:18:37 +0100, Bart wrote: >> >>> I wonder why it is just me that constantly needs to justify his >>>

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Rick Johnson
To: Steven D'Aprano From: Rick Johnson On Monday, June 25, 2018 at 5:56:04 AM UTC-5, Steven D'Aprano wrote: > Nearly everybody misses the fact that the Zen is a joke, > not to be taken *too* seriously. A particularly subtle > joke, but still a joke. The Python Zen is not merely a joke. But it

Re: syntax difference

2018-06-26 Thread Rick Johnson
To: Steven D'Aprano From: "Rick Johnson" To: Steven D'Aprano From: Rick Johnson On Sunday, June 24, 2018 at 10:05:14 AM UTC-5, Steven D'Aprano wrote: [...] > Be fair. It's more like 50% of the time. Let's not dogpile > onto Bart. He asked a question, I answered it, we don't all > need to si

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Stefan Ram
To: Steven D'Aprano From: "Stefan Ram" To: Steven D'Aprano From: r...@zedat.fu-berlin.de (Stefan Ram) Steven D'Aprano writes: >It has been a long, long time since Python has been a "simple" language >suitable for rank beginners, if it ever was. Python is not Scratch. Python is simpler in

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Bart
To: Ben Bacarisse From: "Bart" To: Ben Bacarisse From: Bart On 24/06/2018 01:53, Ben Bacarisse wrote: > Bart writes: >> Wow. (Just think of all the times you write a function containing a >> neat bunch of local functions, every time it's called it has to create >> a new function instances

Re: syntax difference

2018-06-26 Thread Bart
To: boB Stepp From: "Bart" To: boB Stepp From: Bart On 24/06/2018 00:44, boB Stepp wrote: > On Sat, Jun 23, 2018 at 5:35 PM Bart wrote: >> I'm not a user... > > Then I am truly puzzled, Bart. Why do you even bother to hang out on > this list? If you do not want to use Python and you do

Re: syntax difference

2018-06-26 Thread Gregory Ewing
To: Bart From: "Gregory Ewing" To: Bart From: Gregory Ewing Bart wrote: > But 40 years > ago it was just 'readln a,b,c'; it was just taken for granted. The problem with something like that is that it's really only useful for throwaway code. For any serious application, you need to deal wit

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Gregory Ewing
To: Bart From: "Gregory Ewing" To: Bart From: Gregory Ewing Bart wrote: > Wow. (Just think of all the times you write a function containing a neat > bunch of local functions, every time it's called it has to create a new > function instances for each of those functions, even if they are not

Re: syntax difference

2018-06-26 Thread Bart
To: boB Stepp From: "Bart" To: boB Stepp From: Bart On 23/06/2018 20:52, boB Stepp wrote: > I've finally found time to examine this rather long, rambling thread. >> There is a place for various levels of programming language. I'm saying that Python which is always touted as a 'simple' lang

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Ben Bacarisse
To: Bart From: "Ben Bacarisse" To: Bart From: Ben Bacarisse Bart writes: > On 23/06/2018 23:25, Ben Bacarisse wrote: >> Bart writes: >> >>> On 23/06/2018 21:13, Chris Angelico wrote: On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: >>> > (At what point would that happen anyway; if

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Ben Bacarisse
To: Bart From: "Ben Bacarisse" To: Bart From: Ben Bacarisse Bart writes: > On 23/06/2018 21:13, Chris Angelico wrote: >> On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: > >>> (At what point would that happen anyway; if you do this: > >> NONE of your examples are taking copies of the functi

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Bart
To: Ben Bacarisse From: "Bart" To: Ben Bacarisse From: Bart On 23/06/2018 23:25, Ben Bacarisse wrote: > Bart writes: > >> On 23/06/2018 21:13, Chris Angelico wrote: >>> On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: >> (At what point would that happen anyway; if you do this: >> >>> NO

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Bart
To: Chris Angelico From: "Bart" To: Chris Angelico From: Bart On 23/06/2018 21:13, Chris Angelico wrote: > On Sat, Jun 23, 2018 at 10:41 PM, Bart wrote: >> (At what point would that happen anyway; if you do this: > NONE of your examples are taking copies of the function. They all are > m

Re: moving to Python from Java/C++/C

2018-06-26 Thread Dan Stromberg
From: Dan Stromberg On Mon, Jun 25, 2018 at 3:40 AM, wrote: > Hey, > I already have quite an experience in programming, and I wish to study > Python as well. I need to study it before I continue with my comp. science > academic studies. > How do you recommend studying it? As mentioned in the he

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread jkn
To: Chris Angelico From: jkn On Monday, June 25, 2018 at 4:23:57 PM UTC+1, Chris Angelico wrote: > On Mon, Jun 25, 2018 at 11:15 PM, jkn wrote: > > (as well as pedanticism ;-o). > > Pedantry. > > ChrisA > (You know I can't let that one pass.) I was chanel[l]ing the TimBot, as any fule kno...

Proper way to download stylesheets and templates

2018-06-26 Thread T Berger
From: T Berger IΓ ╓m creating a webapp and trying to download a stylesheet and templates from my manualΓ ╓s support site. I must be doing something wrong, because when I try to run my app, I get a 404 error message. I downloaded the files by dragging them off the screen into my webapp folder. Bu

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Tim Chase
From: Tim Chase On 2018-06-23 23:08, Jim Lee wrote: >>> On 06/23/2018 10:03 PM, Steven D'Aprano wrote: def test(): a = 1 b = 2 result = [value for key, value in locals().items()] return result what would you expect the result of calling t

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Alister
To: Mark Lawrence From: Alister On Mon, 25 Jun 2018 11:42:27 +0100, Mark Lawrence wrote: > On 25/06/18 10:10, Alister via Python-list wrote: >> On Mon, 25 Jun 2018 11:36:25 +0400, Abdur-Rahmaan Janhangeer wrote: >> >>> i think he means like for a loop to iterate over a list you might do >>> >>

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Chris Angelico
From: Chris Angelico On Mon, Jun 25, 2018 at 11:15 PM, jkn wrote: > (as well as pedanticism ;-o). Pedantry. ChrisA (You know I can't let that one pass.) --- BBBS/Li6 v4.10 Toy-3 * Origin: Prism bbs (1:261/38) -- https://mail.python.org/mailman/listinfo/python-list

Accessing the Python list

2018-06-26 Thread Paul St George
From: Paul St George Understanding and having an interest in Python does not imply knowledge of Usenet, mailing lists, NNTP, gateways, gmane, bottom-posting, vanilla-flopping, /et al/. But, knowledge of these seems to be needed (or is at least useful) in order to fully benefit from the Python l

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread jkn
To: Paul Moore From: jkn On Monday, June 25, 2018 at 12:17:29 PM UTC+1, Paul Moore wrote: > On 25 June 2018 at 11:53, Steven D'Aprano > wrote: > > > And the specific line you reference is *especially* a joke, one which > > flies past nearly everyone's head: > > > > There should be one-- and p

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Grant Edwards
From: Grant Edwards On 2018-06-25, Steven D'Aprano wrote: > And the specific line you reference is *especially* a joke, one which > flies past nearly everyone's head: > > There should be one-- and preferably only one --obvious way to do it. > > Notice the dashes? There are *two* traditional wa

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Tim Chase
From: Tim Chase On 2018-06-24 05:03, Steven D'Aprano wrote: > I'd like to run a quick survey. There is no right or wrong answer, > since this is about your EXPECTATIONS, not what Python actually > does. > > Given this function: > > def test(): > a = 1 > b = 2 > result = [value for key

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Steven D'Aprano
From: Steven D'Aprano On Sun, 24 Jun 2018 10:46:09 -0700, Jim Lee wrote: > On 06/24/2018 04:35 AM, Steven D'Aprano wrote: >> >> Indeed. That's one of the beauties of Python -- even when there's an >> advanced way to do it, there's generally a simple way too. >> >> > What happened to the Python m

Re: moving to Python from Java/C++/C

2018-06-26 Thread edmondo giovannozzi
To: itaiyz97 From: edmondo.giovanno...@gmail.com Il giorno luned─¼ 25 giugno 2018 12:40:53 UTC+2, itai...@gmail.com ha scritto: > Hey, > I already have quite an experience in programming, and I wish to study Python as well. I need to study it before I continue with my comp. science academic stud

moving to Python from Java/C++/C

2018-06-26 Thread itaiyz97
From: itaiy...@gmail.com Hey, I already have quite an experience in programming, and I wish to study Python as well. I need to study it before I continue with my comp. science academic studies. How do you recommend studying it? As mentioned in the headline, I already know Java, C++ and C. Thanks!

Re: [ANN] pdfposter 0.7

2018-06-26 Thread jkn
To: Hartmut Goebel From: jkn On Sunday, June 24, 2018 at 10:02:05 PM UTC+1, Hartmut Goebel wrote: > I'm pleased to announce pdftools.pdfposter 0.7, a tool to scale and > tile PDF images/pages to print on multiple pages. > > :Homepage: https://pdfposter.readthedocs.io/ > :Author:Γ Γ Hartmut Goe

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Paul Moore
From: Paul Moore On 25 June 2018 at 11:53, Steven D'Aprano wrote: > And the specific line you reference is *especially* a joke, one which > flies past nearly everyone's head: > > There should be one-- and preferably only one --obvious way to do it. > > > Notice the dashes? There are *two* tradi

Re: syntax difference

2018-06-26 Thread Bart
To: Steven D'Aprano From: Bart On 25/06/2018 01:52, Steven D'Aprano wrote: > On Sun, 24 Jun 2018 21:21:57 +0100, Bart wrote: > >> I've had half a dozen users > > Come back when you've had *half a million users* then we'll take your > experiences seriously. That being the case with Python (mayb

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Alister
To: Abdur-Rahmaan Janhangeer From: Alister On Mon, 25 Jun 2018 11:36:25 +0400, Abdur-Rahmaan Janhangeer wrote: > i think he means like for a loop to iterate over a list you might do > > list = [1,2,3] > for i in range(len(list)): > print(list[i]) > > > but the you might as well go for the

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer we must maybe fibd an example where both are pythonic but one is simpler unless my type of example was intented by @steve Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > --- BBBS/Li6 v4.10 Toy-3 * Origin: Prism bbs (1:261/38) -- https://mail.pyth

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Jim Lee
From: Jim Lee On 06/24/2018 04:35 AM, Steven D'Aprano wrote: > > Indeed. That's one of the beauties of Python -- even when there's an > advanced way to do it, there's generally a simple way too. > > What happened to the Python maxim "There should be oneΓ ÷and preferably only oneΓ ÷obvious way t

Web Solutions with PYTHON - Etisbew Technology Group

2018-06-26 Thread Etisbew Technology Group
From: Etisbew Technology Group Etisbew is a leading Python development company, serving businesses across the globe by delivering successful web-based apps using Python frameworks like TurboGears, Django, web2py & more. With hands-on experience over the Python web development, we offer bespoke,

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer i think he means like for a loop to iterate over a list you might do list = [1,2,3] for i in range(len(list)): print(list[i]) but the you might as well go for the simpler : for elem in list: print(elem) Abdur-Rahmaan Janhangeer https://github.com/Abd

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Ben Finney
From: Ben Finney Paul Moore writes: > On 24 June 2018 at 06:03, Steven D'Aprano > wrote: > > Given this function: > > > > def test(): > > a = 1 > > b = 2 > > result = [value for key, value in locals().items()] > > return result > > > > what would you expect the result of callin

I'm getting a spamassassin party here

2018-06-26 Thread Gene Heskett
From: Gene Heskett Greetings list; Generally spamassassin only gets picky about this occasionally, but for the past several hours its working overtime on python list messages, with the major problem being the servers time stamp, a day or more in the past. Anyboy ever hear of ntpd? -- Cheers, Ge

Re: Anyone here on Python-Dev mailing list?

2018-06-26 Thread Ben Finney
From: Ben Finney Steven D'Aprano writes: > Anyone on the Python-Dev mailing list, are you getting private emails > containing nothing but stream of consciousness word-salad from > somebody (some bot?) calling himself "Chanel Marvin" with a gmail > address? I am on that forum (via Gmane), and a

Re: syntax difference

2018-06-26 Thread Steven D'Aprano
From: Steven D'Aprano On Sun, 24 Jun 2018 21:21:57 +0100, Bart wrote: > I've had half a dozen users Come back when you've had *half a million users* then we'll take your experiences seriously. https://blog.pythonanywhere.com/67/ https://stackoverflow.blog/2017/09/06/incredible-growth-python/

[ANN] pdfposter 0.7

2018-06-26 Thread Hartmut Goebel
From: Hartmut Goebel I'm pleased to announce pdftools.pdfposter 0.7, a tool to scale and tile PDF images/pages to print on multiple pages. :Homepage: https://pdfposter.readthedocs.io/ :Author:Γ Γ Hartmut Goebel :Licence:Γ GNU Public Licence v3 (GPLv3) :Quick Installation: Γ Γ Γ pip install

Re: Package directory question

2018-06-26 Thread Ben Finney
From: Ben Finney Robert Latest via Python-list writes: > Because the main.py script needs to import the tables.py module from > backend, I put this at the top if main.py: > >sys.path.append('../..') >import jobwatch.backend.tables as tables > > My question is: Is this the way it should

Re: syntax difference

2018-06-26 Thread Bart
To: Steven D'Aprano From: Bart On 24/06/2018 20:02, Steven D'Aprano wrote: > On Sun, 24 Jun 2018 19:37:33 +0100, Bart wrote: > >> I want to program in /my/ style > > Python is not Java, and Java is not Python either. Nor is it "Bart's > Language", or C, or Forth, or Lisp, or bash. > > https://d

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Paul Moore
From: Paul Moore On 24 June 2018 at 06:03, Steven D'Aprano wrote: > I'd like to run a quick survey. There is no right or wrong answer, since > this is about your EXPECTATIONS, not what Python actually does. > > Given this function: > > > def test(): > a = 1 > b = 2 > result = [value

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Stefan Ram
To: Stefan Ram From: r...@zedat.fu-berlin.de (Stefan Ram) r...@zedat.fu-berlin.de (Stefan Ram) writes: >Still, one must not forget that learning Python encompasses >all the hard work it takes to learn how to program in every >language. "Beginner", however, is a very vague term. A good scienti

Re: Anyone here on Python-Dev mailing list?

2018-06-26 Thread Rick Johnson
To: Steven D'Aprano From: Rick Johnson Steven D'Aprano wrote: [...] > I get spam bots trying to flush out suckers. I don't get > bots that send out random messages to random people. Why? Steven, my son, i suppose some questions just answer themselves... --- BBBS/Li6 v4.10 Toy-3 * Origin: Pri

Re: translating foreign data

2018-06-26 Thread Stefan Ram
To: Richard Damon From: "Stefan Ram" To: Richard Damon From: r...@zedat.fu-berlin.de (Stefan Ram) Richard Damon writes: >Now, if I have a parser that doesn't use the locale, but some other rule >base than I just need to provide it with the right rules, which is >basically just defining the

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer naaa it was not meant to be python ^^ Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > > --- BBBS/Li6 v4.10 Toy-3 * Origin: Prism bbs (1:261/38) -- https://mail.python.org/mailman/listinfo/python-list

Re: translating foreign data

2018-06-26 Thread Marko Rauhamaa
To: Richard Damon From: "Marko Rauhamaa" To: Richard Damon From: Marko Rauhamaa Richard Damon : > On 6/23/18 9:05 AM, Marko Rauhamaa wrote: >> Richard Damon : >> >>> On 6/23/18 8:03 AM, Marko Rauhamaa wrote: I always know my locale. The locale is tied to the human user. >>> No, it sho

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Bart
To: Stefan Ram From: "Bart" To: Stefan Ram From: Bart On 23/06/2018 14:32, Stefan Ram wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >> def f(): >> def g(): >> g.x += 1 >> return g.x >> g.x = 0 >> return g > >Or, "for all g to share the same x": > >

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Stefan Ram
To: Stefan Ram From: "Stefan Ram" To: Stefan Ram From: r...@zedat.fu-berlin.de (Stefan Ram) r...@zedat.fu-berlin.de (Stefan Ram) writes: >def f(): >def g(): >g.x += 1 >return g.x >g.x = 0 >return g Or, "for all g to share the same x": main.py def f(): d

Re: translating foreign data

2018-06-26 Thread Marko Rauhamaa
To: Richard Damon From: "Marko Rauhamaa" To: Richard Damon From: Marko Rauhamaa Richard Damon : > On 6/23/18 8:03 AM, Marko Rauhamaa wrote: >> I always know my locale. The locale is tied to the human user. > No, it should be tied to the data you are processing. In computing, a locale i

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Stefan Ram
To: Steven D'Aprano From: "Stefan Ram" To: Steven D'Aprano From: r...@zedat.fu-berlin.de (Stefan Ram) Steven D'Aprano writes: >def f(): >static x = 0 >def g(): >x += 1 >return x >return g What one can do today: main.py def g(): g.x += 1 return g.x

Re: translating foreign data

2018-06-26 Thread Marko Rauhamaa
To: Richard Damon From: "Marko Rauhamaa" To: Richard Damon From: Marko Rauhamaa Richard Damon : > If you know the Locale, then you do know what the decimal separator > is, as that is part of what a locale defines. I don't know what that sentence means. > The issue is that if you just know

Re: translating foreign data

2018-06-26 Thread Steven D'Aprano
From: "Steven D'Aprano" From: Steven D'Aprano On Sat, 23 Jun 2018 06:26:22 -0400, Richard Damon wrote: > If you know the Locale, then you do know what the decimal separator is, > as that is part of what a locale defines. A locale defines a set of common cultural conventions. It doesn't mandat

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Bart
To: Steven D'Aprano From: "Bart" To: Steven D'Aprano From: Bart On 23/06/2018 04:51, Steven D'Aprano wrote: > On Wed, 20 Jun 2018 14:18:19 +1000, Chris Angelico wrote: > >> Ah. Yeah, that would be a plausible feature to add to Python. But in C, >> a static variable is basically the same thi

Re: ironpython not support py3.6

2018-06-26 Thread Peter J. Holzer
From: "Peter J. Holzer" From: "Peter J. Holzer" --prnws536gtytpj5v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018-06-22 17:20:29 -0700, denis.akhiya...@gmail.com wrote: > Either wait for IronPython 3.6, use COM intero

Re: translating foreign data

2018-06-26 Thread Richard Damon
From: "Richard Damon" From: Richard Damon On 6/22/18 11:21 PM, Steven D'Aprano wrote: > On Fri, 22 Jun 2018 20:06:35 +0100, Ben Bacarisse wrote: > >> Steven D'Aprano writes: >> >>> On Fri, 22 Jun 2018 11:14:59 +0100, Ben Bacarisse wrote: >>> >> The code page remark is curious. Will some "

Re: ironpython not support py3.6

2018-06-26 Thread wxjmfauth
To: Steven D'Aprano From: "wxjmfauth" To: Steven D'Aprano From: wxjmfa...@gmail.com Le vendredi 22 juin 2018 11:07:15 UTC+2, Steven D'Aprano a ─CcritΓ : > > C# <--> IronPython 2.7 <--> CPython 3.6 > C# <--> IronPython 2.7. It will not work. Coding of characters ! Try with IronPython 2.7.8.

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Chris Angelico
From: "Chris Angelico" From: Chris Angelico On Sat, Jun 23, 2018 at 1:51 PM, Steven D'Aprano wrote: > On Wed, 20 Jun 2018 14:18:19 +1000, Chris Angelico wrote: > >> Ah. Yeah, that would be a plausible feature to add to Python. But in C, >> a static variable is basically the same thing as a glo

Re: Static variables [was Re: syntax difference]

2018-06-26 Thread Chris Angelico
From: "Chris Angelico" From: Chris Angelico On Sat, Jun 23, 2018 at 2:16 PM, Chris Angelico wrote: > For getting rid of the "len=len" trick, though, I would REALLY like to > transform those into LOAD_CONST. That'd be a fun bytecode hack all on > its own. In fact, I'm gonna have a shot at that.

Re: translating foreign data

2018-06-26 Thread Steven D'Aprano
From: "Steven D'Aprano" From: Steven D'Aprano On Fri, 22 Jun 2018 20:06:35 +0100, Ben Bacarisse wrote: > Steven D'Aprano writes: > >> On Fri, 22 Jun 2018 11:14:59 +0100, Ben Bacarisse wrote: >> > The code page remark is curious. Will some "code pages" have digits > that are not ASCII

Static variables [was Re: syntax difference]

2018-06-26 Thread Steven D'Aprano
From: "Steven D'Aprano" From: Steven D'Aprano On Wed, 20 Jun 2018 14:18:19 +1000, Chris Angelico wrote: > Ah. Yeah, that would be a plausible feature to add to Python. But in C, > a static variable is basically the same thing as a global variable, > except that its name is scoped to the functi

Re: translating foreign data

2018-06-26 Thread Ben Bacarisse
To: Steven D'Aprano From: "Ben Bacarisse" To: Steven D'Aprano From: Ben Bacarisse Steven D'Aprano writes: > On Fri, 22 Jun 2018 11:14:59 +0100, Ben Bacarisse wrote: > The code page remark is curious. Will some "code pages" have digits that are not ASCII digits? >>> >>> Good que

RE: ironpython not support py3.6

2018-06-26 Thread denis akhiyarov
To: Schachner, Joseph From: "denis akhiyarov" To: Schachner, Joseph From: denis.akhiya...@gmail.com Either wait for IronPython 3.6, use COM interop, pythonnet, subprocess, or things like gRPC. Based on PyPy experience, it is probably 1-2 years of sponsored development to get a working IronPy

Re: translating foreign data

2018-06-26 Thread Richard Damon
From: Richard Damon On 6/23/18 10:44 PM, Steven D'Aprano wrote: > On Sat, 23 Jun 2018 17:52:55 -0400, Richard Damon wrote: > >> If you have more than just a number representing a value in the locale >> currency, you can't ask the locale how to present/accept it. > You're the only one saying that

Re: Feeding the trolls

2018-06-26 Thread mm0fmf
To: Steven D'Aprano From: "mm0fmf" To: Steven D'Aprano From: mm0fmf On 22/06/2018 00:51, Steven D'Aprano wrote: > On Thu, 21 Jun 2018 21:49:15 +0100, mm0fmf wrote: > > [snip unnecessary quoting] >> Design requirements for python newsreader client: >> >> 1. Block all top posters > > I think

Re: syntax difference

2018-06-26 Thread Richard Damon
From: Richard Damon On 6/24/18 3:02 PM, Steven D'Aprano wrote: > On Sun, 24 Jun 2018 19:37:33 +0100, Bart wrote: > >> I want to program in /my/ style > Python is not Java, and Java is not Python either. Nor is it "Bart's > Language", or C, or Forth, or Lisp, or bash. > > https://dirtsimple.org/20

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-26 Thread Bart
To: Abdur-Rahmaan Janhangeer From: Bart On 24/06/2018 19:36, Abdur-Rahmaan Janhangeer wrote: > see for example > > https://en.m.wikipedia.org/wiki/Bresenham%27s_line_algorithm > > see the pseudocode, i was implementing some raster algos when i found > myself aux anges > > so close to py. i gues

Re: syntax difference

2018-06-26 Thread Steven D'Aprano
From: Steven D'Aprano On Sun, 24 Jun 2018 19:37:33 +0100, Bart wrote: > I want to program in /my/ style Python is not Java, and Java is not Python either. Nor is it "Bart's Language", or C, or Forth, or Lisp, or bash. https://dirtsimple.org/2004/12/python-is-not-java.html https://dirtsimple.

Re: syntax difference

2018-06-26 Thread Terry Reedy
From: Terry Reedy On 6/24/2018 11:39 AM, Bart wrote: Bart, I agree that people should not dogpile onto you. As with Rick, I read your posts or not, depending on whether I feel like being entertained at the moment, and usually move on without comment. > I know I'm going to get flak for bringing

Re: Anyone here on Python-Dev mailing list?

2018-06-26 Thread Terry Reedy
From: Terry Reedy On 6/24/2018 12:07 PM, Steven D'Aprano wrote: > Anyone on the Python-Dev mailing list, are you getting private emails > containing nothing but stream of consciousness word-salad from somebody > (some bot?) calling himself "Chanel Marvin" with a gmail address? > > Typical example

Re: I'm getting a spamassassin party here

2018-06-26 Thread Gene Heskett
On Tuesday 26 June 2018 02:50:01 Cameron Simpson wrote: > On 24Jun2018 17:03, Gene Heskett wrote: > >Greetings list; > > > >Generally spamassassin only gets picky about this occasionally, but > > for the past several hours its working overtime on python list > > messages, with the major problem b

Re: syntax difference

2018-06-26 Thread Antoon Pardon
On 26-06-18 14:47, Bart wrote: > > [About bitsets] > > Here's the set of characters allowed in a C identifier (not using > Python syntax): > >   cident = {'A'..'Z', 'a'..'z', '0'..'9', '_', '9'} > > The characters allowed in a hex constant: > >   {'0'..'9', 'A'..'F', 'a'..'f'} > > A set representin

Re: syntax difference

2018-06-26 Thread Bart
On 26/06/2018 12:39, Chris Angelico wrote: On Tue, Jun 26, 2018 at 9:30 PM, Bart wrote: On 19/06/2018 11:33, Steven D'Aprano wrote: On Tue, 19 Jun 2018 10:19:15 +0100, Bart wrote: * Integer sets (Pascal-like sets) Why do you need them if you have real sets? I tried Python sets for the

Re: I'm getting a spamassassin party here

2018-06-26 Thread Richard Damon
On 6/26/18 2:50 AM, Cameron Simpson wrote: > On 24Jun2018 17:03, Gene Heskett wrote: >> Greetings list; >> >> Generally spamassassin only gets picky about this occasionally, but for >> the past several hours its working overtime on python list messages, >> with the major problem being the servers

Re: syntax difference

2018-06-26 Thread Chris Angelico
On Tue, Jun 26, 2018 at 9:30 PM, Bart wrote: > On 19/06/2018 11:33, Steven D'Aprano wrote: >> >> On Tue, 19 Jun 2018 10:19:15 +0100, Bart wrote: > > >> * Integer sets (Pascal-like sets) >> >> Why do you need them if you have real sets? > > > I tried Python sets for the first time. They seemed work

Re: syntax difference

2018-06-26 Thread Bart
On 19/06/2018 11:33, Steven D'Aprano wrote: On Tue, 19 Jun 2018 10:19:15 +0100, Bart wrote: * Integer sets (Pascal-like sets) Why do you need them if you have real sets? I tried Python sets for the first time. They seemed workable but rather clunky to set up. But here is one problem on my

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Antoon Pardon
On 26-06-18 12:39, Steven D'Aprano wrote: > On Tue, 26 Jun 2018 12:04:16 +0200, Antoon Pardon wrote: > >> On 26-06-18 11:22, Steven D'Aprano wrote: >>> On Tue, 26 Jun 2018 10:20:38 +0200, Antoon Pardon wrote: >>> > def test(): > a = 1 > b = 2 > result = [value for key, v

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Steven D'Aprano
On Tue, 26 Jun 2018 12:04:16 +0200, Antoon Pardon wrote: > On 26-06-18 11:22, Steven D'Aprano wrote: >> On Tue, 26 Jun 2018 10:20:38 +0200, Antoon Pardon wrote: >> def test(): a = 1 b = 2 result = [value for key, value in locals().items()] return result >> [...] >>

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Paul Moore
On 26 June 2018 at 11:09, Chris Angelico wrote: > On Tue, Jun 26, 2018 at 8:04 PM, Antoon Pardon wrote: >> On 26-06-18 11:22, Steven D'Aprano wrote: >>> On Tue, 26 Jun 2018 10:20:38 +0200, Antoon Pardon wrote: >>> > def test(): > a = 1 > b = 2 > result = [value for key

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Antoon Pardon
On 26-06-18 12:09, Chris Angelico wrote: > On Tue, Jun 26, 2018 at 8:04 PM, Antoon Pardon wrote: >> On 26-06-18 11:22, Steven D'Aprano wrote: >>> On Tue, 26 Jun 2018 10:20:38 +0200, Antoon Pardon wrote: >>> > def test(): > a = 1 > b = 2 > result = [value for key, value

Re: Quick survey: locals in comprehensions (Python 3 only)

2018-06-26 Thread Chris Angelico
On Tue, Jun 26, 2018 at 8:04 PM, Antoon Pardon wrote: > On 26-06-18 11:22, Steven D'Aprano wrote: >> On Tue, 26 Jun 2018 10:20:38 +0200, Antoon Pardon wrote: >> def test(): a = 1 b = 2 result = [value for key, value in locals().items()] return result >> [..

  1   2   >