Re: Stefan's headers [was:Names and identifiers]

2018-06-12 Thread Steven D'Aprano
On Tue, 12 Jun 2018 16:40:47 +1000, Chris Angelico wrote: > On Tue, Jun 12, 2018 at 4:32 PM, Gregory Ewing > wrote: >> There are some historical and present-day facts that don't support that >> idea. >> >> * Software existed in the days before it became seen as something to be >> sold for money p

Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 11Jun2018 22:51, Tamara Berger wrote: On Monday, June 11, 2018 at 7:24:58 PM UTC-4, Gregory Ewing wrote: Tamara Berger wrote: > I typed these 2 lines in the terminal: > 192:~ TamaraB$ sudo python3 python3 -m pip install pytest You need to enter this *single* line in the Terminal: su

Re: Stefan's headers [was:Names and identifiers]

2018-06-12 Thread Marko Rauhamaa
Gregory Ewing : > * Charging money for copies of software is not the only way to make > money from programming. You can charge for support services. You can > charge for writing custom one-off software. There are people who make > a good living from doing these things. Maybe so. It can't be denie

Re: Question : Input after all prompts in python

2018-06-12 Thread Bart
On 11/06/2018 12:16, Steven D'Aprano wrote: On Mon, 11 Jun 2018 01:44:19 -0700, mohan4h wrote: Everyone, I am very new to python. I am trying to achieve the below in it, but i am unable to find suitable documentation to guide me on the same. I want to prompt 3 questions together and then get

Re: Posting warning message

2018-06-12 Thread T Berger
On Tuesday, June 12, 2018 at 3:28:29 AM UTC-4, Cameron Simpson wrote: > On 11Jun2018 22:51, Tamara Berger wrote: > >On Monday, June 11, 2018 at 7:24:58 PM UTC-4, Gregory Ewing wrote: > >> Tamara Berger wrote: > >> > I typed these 2 lines in the terminal: > >> > 192:~ TamaraB$ sudo python3 > >> >>>

Re: Posting warning message

2018-06-12 Thread T Berger
On Monday, June 11, 2018 at 7:24:58 PM UTC-4, Gregory Ewing wrote: > Tamara Berger wrote: > > I typed these 2 lines in the terminal: > > > > 192:~ TamaraB$ sudo python3 > > ... > python3 -m pip install pytest > > You need to enter this *single* line in the Terminal: > > sudo python3 -m

Re: Posting warning message

2018-06-12 Thread T Berger
On Tuesday, June 12, 2018 at 3:28:29 AM UTC-4, Cameron Simpson wrote: > On 11Jun2018 22:51, Tamara Berger wrote: > >On Monday, June 11, 2018 at 7:24:58 PM UTC-4, Gregory Ewing wrote: > >> Tamara Berger wrote: > >> > I typed these 2 lines in the terminal: > >> > 192:~ TamaraB$ sudo python3 > >> >>>

Re: Question : Input after all prompts in python

2018-06-12 Thread mohan4h
On Tuesday, June 12, 2018 at 7:37:25 PM UTC+8, Bart wrote: > On 11/06/2018 12:16, Steven D'Aprano wrote: > > On Mon, 11 Jun 2018 01:44:19 -0700, mohan4h wrote: > > > >> Everyone, > >> > >> I am very new to python. I am trying to achieve the below in it, but i > >> am unable to find suitable docume

Re: Posting warning message

2018-06-12 Thread T Berger
On Tuesday, June 12, 2018 at 3:28:29 AM UTC-4, Cameron Simpson wrote: > On 11Jun2018 22:51, Tamara Berger wrote: > >On Monday, June 11, 2018 at 7:24:58 PM UTC-4, Gregory Ewing wrote: > >> Tamara Berger wrote: > >> > I typed these 2 lines in the terminal: > >> > 192:~ TamaraB$ sudo python3 > >> >>>

Re: Posting warning message

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 12:17 AM, T Berger wrote: > > Sorry, to bother you again. But is there some way to edit a message once its > posted? Or do I have to delete it and rewrite it? Nope. And you can't delete it either. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Filters

2018-06-12 Thread T Berger
Why doesn't the system allow me to set filters for my own posts? I was able to do it once, but when I returned to the forum, I was back among the unfiltered posts. When I tried to reapply the filter, the option was grayed out. Also, I've selected the option to get email updates to my posts, but

Re: Posting warning message

2018-06-12 Thread T Berger
On Tuesday, June 12, 2018 at 10:27:06 AM UTC-4, Chris Angelico wrote: > On Wed, Jun 13, 2018 at 12:17 AM, T Berger wrote: > > > > Sorry, to bother you again. But is there some way to edit a message once > > its posted? Or do I have to delete it and rewrite it? > > Nope. And you can't delete it e

Re: Posting warning message

2018-06-12 Thread T Berger
On Tuesday, June 12, 2018 at 3:28:29 AM UTC-4, Cameron Simpson wrote: > On 11Jun2018 22:51, Tamara Berger wrote: > >On Monday, June 11, 2018 at 7:24:58 PM UTC-4, Gregory Ewing wrote: > >> Tamara Berger wrote: > >> > I typed these 2 lines in the terminal: > >> > 192:~ TamaraB$ sudo python3 > >> >>>

Re: Filters

2018-06-12 Thread pyotr filipivich
T Berger on Tue, 12 Jun 2018 07:45:58 -0700 (PDT) typed in comp.lang.python the following: >Why doesn't the system allow me to set filters for my own posts? I was able to >do it once, but when I returned to the forum, I was back among the unfiltered >posts. When I tried to reapply the filter, t

Re: Re: FULLSCREEN and DOUBLEBUF

2018-06-12 Thread Paul St George
Dennis Lee Bieber wrote: Both may be dependent upon the actual hardware graphics board and the drivers for said board. On 11/06/2018 01:47, Gregory Ewing wrote: My guess is that if your surface is not fullscreen or is not a hardware surface, then you're always drawing into an ofscreen bu

Re: Posting warning message

2018-06-12 Thread Grant Edwards
On 2018-06-12, Chris Angelico wrote: > On Wed, Jun 13, 2018 at 12:17 AM, T Berger wrote: > >> Sorry, to bother you again. But is there some way to edit a message >> once its posted? Or do I have to delete it and rewrite it? > > Nope. And you can't delete it either. That depends. If you're posti

Re: Filters

2018-06-12 Thread Grant Edwards
On 2018-06-12, pyotr filipivich wrote: > It is Google. They will decide what is evil. and not do that. They've found it simpler to just declare than anything they do is, by definition, therefore not evil. -- Grant Edwards grant.b.edwardsYow! There's enough money

Re: Filters

2018-06-12 Thread Mark Lawrence
On 12/06/18 15:45, T Berger wrote: Why doesn't the system allow me to set filters for my own posts? I was able to do it once, but when I returned to the forum, I was back among the unfiltered posts. When I tried to reapply the filter, the option was grayed out. Also, I've selected the option t

[RELEASE] Python 3.7.0rc1 and 3.6.6rc1 are now available

2018-06-12 Thread Ned Deily
Python 3.7.0rc1 and 3.6.6rc1 are now available. 3.7.0rc1 is the final planned release preview of Python 3.7, the next feature release of Python. 3.6.6rc1 is the the release preview of the next maintenance release of Python 3.6, the current release of Python. Assuming no critical problems are found

Re: Stefan's headers [was:Names and identifiers]

2018-06-12 Thread Rick Johnson
Gregory Ewing wrote: [...] > * Charging money for copies of software is not the only way > to make money from programming. You can charge for support > services. You can charge for writing custom one-off > software. There are people who make a good living from > doing these things. Microsoft not

Splitting up large python module impact on performance?

2018-06-12 Thread Bill Deegan
Greetings, I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. Should I expect any performance hit from splitting some of the classes out to other files? Thanks, Bill -- https://mail.python.org/mailman/listinfo/python-l

Re: FULLSCREEN and DOUBLEBUF

2018-06-12 Thread Greg Ewing
Paul St George wrote: I had considered meddling with the config.txt to try to enable* HWSURFACE but from what you say, this is unnecessary. I don't really have much idea what effect HWSURFACE would have, if any. It will certainly depend a lot on your hardware and drivers. My suggestion would b

Re: Posting warning message

2018-06-12 Thread Michael Torrie
On 06/12/2018 08:48 AM, T Berger wrote: > I deleted them a number of time, then got a bar across the page indicating > that a post had been deleted. It's nuts that you can't edit your own post. This "forum" is actually a mailing list mirrored to Usenet, so whatever you post gets instantly emailed

Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 12Jun2018 07:48, Tamara Berger wrote: On Tuesday, June 12, 2018 at 10:27:06 AM UTC-4, Chris Angelico wrote: On Wed, Jun 13, 2018 at 12:17 AM, T Berger wrote: > Sorry, to bother you again. But is there some way to edit a message once > its posted? Or do I have to delete it and rewrite it?

Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 12Jun2018 07:14, Tamara Berger wrote: On Tuesday, June 12, 2018 at 3:28:29 AM UTC-4, Cameron Simpson wrote: On 11Jun2018 22:51, Tamara Berger wrote: [...] >192:~ TamaraB$ sudo python3 -m pip install pytest >Password: >The directory '/Users/TamaraB/Library/Caches/pip/http' or its parent di

pep8 Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 12Jun2018 07:51, Tamara Berger wrote: [... snip ...] One more thing about PEP8. My workbook is a bit skimpy on details. Is there a quick way to make the edits PEP8 is a style recommendation for Python code: https://www.python.org/dev/peps/pep-0008/ It is followed pretty rigorously in the

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Cameron Simpson
On 12Jun2018 15:00, Bill Deegan wrote: I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. Should I expect any performance hit from splitting some of the classes out to other files? In general, nothing significant. Ye

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 10:32 AM, Cameron Simpson wrote: > I think I'm saying: don't worry unless your applications are very time > critical (eg invoked very frequently and/or doing almost nothing after the > "import" phase) or you notice a significant slowdown after your changes. And > it is usua

Re: pep8 Re: Posting warning message

2018-06-12 Thread Gregory Ewing
Cameron Simpson wrote: PEP8 is a style recommendation for Python code: https://www.python.org/dev/peps/pep-0008/ Specifically, it's a style guide for *code in the Python standard library*, as it says in the Introduction: This document gives coding conventions for the Python code comprising

Re: pep8 Re: Posting warning message

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 10:46 AM, Gregory Ewing wrote: > Cameron Simpson wrote: >> >> PEP8 is a style recommendation for Python code: >> >> https://www.python.org/dev/peps/pep-0008/ > > > Specifically, it's a style guide for *code in the Python > standard library*, as it says in the Introduction:

Re: Index of entity in List with a Condition

2018-06-12 Thread Cameron Simpson
On 11Jun2018 13:48, Subhabrata Banerjee wrote: I have the following sentence, "Donald Trump is the president of United States of America". I am trying to extract the index 'of', not only for single but also for its multi-occurance (if they occur), from the list of words of the string, made by

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Gregory Ewing
Bill Deegan wrote: Should I expect any performance hit from splitting some of the classes out to other files? I doubt it. Time taken to load modules is mostly dependent on the total amount of code, not how many files it lives in. If you had a *very* large number of tiny files, it might be a bi

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Steven D'Aprano
On Tue, 12 Jun 2018 15:00:44 -0700, Bill Deegan wrote: > Greetings, > > I'm doing some refactoring on a fairly large python codebase. Some of > the files are > 4000 lines long and contain many classes. > > Should I expect any performance hit from splitting some of the classes > out to other file

helpfulness Re: Index of entity in List with a Condition

2018-06-12 Thread Cameron Simpson
On 11Jun2018 18:03, Rick Johnson wrote: subhaba...@gmail.com wrote: I have the following sentence, "Donald Trump is the president of United States of America". [...] Typically when you ask us to do your homework for you, it is considered bad taste to present the teacher's assignment verbati

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Rick Johnson
Bill Deegan wrote: > I'm doing some refactoring on a fairly large python > codebase. Some of the files are > 4000 lines long and > contain many classes. I would argue that files of such size are a total pain to navigate and thus, edit. I prefer to place only one -- or only a handful of classes --

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 1:23 PM, Rick Johnson wrote: > Bill Deegan wrote: >> I'm doing some refactoring on a fairly large python >> codebase. Some of the files are > 4000 lines long and >> contain many classes. > > I would argue that files of such size are a total pain to > navigate and thus, edit

Re: pep8 Re: Posting warning message

2018-06-12 Thread Tamara Berger
Hi Cameron, Thanks for the in-depth answer. I'm going to have to read it carefully, with the help of a Python glossary. Some of the terms you use are new to me. >or am I supposed to root around for my module and make the edits one by one? I was trying to be amusing and didn't get my point across

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Cameron Simpson
On 13Jun2018 13:35, Chris Angelico wrote: On Wed, Jun 13, 2018 at 1:23 PM, Rick Johnson wrote: Bill Deegan wrote: I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. I would argue that files of such size are a total

Re: Index of entity in List with a Condition

2018-06-12 Thread subhabangalore
On Wednesday, June 13, 2018 at 6:30:45 AM UTC+5:30, Cameron Simpson wrote: > On 11Jun2018 13:48, Subhabrata Banerjee wrote: > >I have the following sentence, > > > >"Donald Trump is the president of United States of America". > > > >I am trying to extract the index 'of', not only for single but als

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Rick Johnson
On Tuesday, June 12, 2018 at 10:35:47 PM UTC-5, Chris Angelico wrote: [...] > A few thousand lines in a file is only a problem if you're > using an editor that lacks a Find feature. Or if you use > bad function/class names that you can't search for. I'm unaware of any text editor that doesn't have

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 2:15 PM, Rick Johnson wrote: > On Tuesday, June 12, 2018 at 10:35:47 PM UTC-5, Chris Angelico wrote: > [...] >> A few thousand lines in a file is only a problem if you're >> using an editor that lacks a Find feature. Or if you use >> bad function/class names that you can't

Re: Posting warning message

2018-06-12 Thread Tamara Berger
On Tue, Jun 12, 2018 at 7:57 PM Cameron Simpson wrote: > > On 12Jun2018 07:14, Tamara Berger wrote: > >Just one more thing, Cameron. I was looking at an Apple support page, and it > >says "When you're logged in to your Mac using an administrator account, you > >can use the sudo command in the

Re: pep8 Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 13Jun2018 00:05, Tamara Berger wrote: Thanks for the in-depth answer. I'm going to have to read it carefully, with the help of a Python glossary. Some of the terms you use are new to me. No worries. Just ask if you don't find definitions. BTW, a "lint" program, or "linter" is a program for

Re: Posting warning message

2018-06-12 Thread Tamara Berger
On Tue, Jun 12, 2018 at 7:50 PM Cameron Simpson wrote: > > On 12Jun2018 07:48, Tamara Berger wrote: > > > >> On Wed, Jun 13, 2018 at 12:17 AM, T Berger wrote: > >> > Sorry, to bother you again. But is there some way to edit a message once > >> > its posted? Or do I have to delete it and rewrite

Re: Posting warning message

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 2:41 PM, Tamara Berger wrote: > I just meant edit within the moment or two after you've posted a > message. I think a good feature in this forum would allow posters to > edit their messages in just that way. I have such a feature enabled in > gmail. I can "undo" my action

Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 13Jun2018 00:41, Tamara Berger wrote: I just meant edit within the moment or two after you've posted a message. I think a good feature in this forum would allow posters to edit their messages in just that way. I have such a feature enabled in gmail. I can "undo" my action for 30 seconds afte

Re: What is the "Unpacking Arguments List" rule?

2018-06-12 Thread dieter
Jach Fong writes: > ... > 4.7.4. Unpacking Argument Lists > The reverse situation occurs when the arguments are already in a list or > tuple but need to be unpacked for a function call requiring separate > positional arguments. > ... args = [3, 6] list(range(*args)) > """ > > I can't

Re: Posting warning message

2018-06-12 Thread Cameron Simpson
On 13Jun2018 00:29, Tamara Berger wrote: On Tue, Jun 12, 2018 at 7:57 PM Cameron Simpson wrote: On 12Jun2018 07:14, Tamara Berger wrote: >Just one more thing, Cameron. I was looking at an Apple support page, and it says "When you're logged in to your Mac using an administrator account, yo

Re: Index of entity in List with a Condition

2018-06-12 Thread Cameron Simpson
On 12Jun2018 21:06, Subhabrata Banerjee wrote: Dear Sir, Thank you for your kind reply. I am trying in few days time and getting back. I made a small fix of my own and I would discuss it, too. Thank you for your kind words, but I ignore unnecessary remarks. So please do not worry. Meanwhile,

Re: Splitting up large python module impact on performance?

2018-06-12 Thread dieter
Bill Deegan writes: > I'm doing some refactoring on a fairly large python codebase. > Some of the files are > 4000 lines long and contain many classes. I am typically working with systems consisting of hundreds of modules (Zope/Plone). Such large systems have a significant impact on startup time

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Gregory Ewing
Chris Angelico wrote: A few thousand lines in a file is only a problem if you're using an editor that lacks a Find feature. My editor has a find feature, but I still find it a nuisance to have to use it every single time I want to find something. -- Greg -- https://mail.python.org/mailman/list

Re: Posting warning message

2018-06-12 Thread Gregory Ewing
Tamara Berger wrote: Live means live. It is not a word I created. It means that the link has been activated, so clicking on it will take you to the associated page. Okay, I think "clickable" is a better word to describe this. Most mail reading software these days automatically recognises thing

Re: Why exception from os.path.exists()?

2018-06-12 Thread Peter J. Holzer
On 2018-06-11 12:24:54 +, Steven D'Aprano wrote: > On Mon, 11 Jun 2018 12:31:09 +0200, Peter J. Holzer wrote: > > On 2018-06-11 01:06:37 +, Steven D'Aprano wrote: > >> On Sun, 10 Jun 2018 23:57:35 +0200, Peter J. Holzer wrote: > > > > [Note: I was talking about os.stat here, not os.path.ex

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Cameron Simpson
On 13Jun2018 17:53, Greg Ewing wrote: Chris Angelico wrote: A few thousand lines in a file is only a problem if you're using an editor that lacks a Find feature. My editor has a find feature, but I still find it a nuisance to have to use it every single time I want to find something. Tags f