Re: [Tutor] Anti-Patterns in Python Programming

2014-07-13 Thread Steven D'Aprano
On Sun, Jul 13, 2014 at 08:01:03PM -0400, Audrey M Roy wrote: [...] > > This is perfectly clean: the eggs module reaches into the spam module, > > grabs the current value of x (23), and sticks that value into itself. > > What it's doing may be more clear if we re-write eggs.py in a slightly > > lo

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-13 Thread Audrey M Roy
On Fri, Jul 11, 2014 at 10:43 PM, Steven D'Aprano wrote: > On Fri, Jul 11, 2014 at 01:04:59PM -0700, Audrey M Roy wrote: >> Steven, any chance you could clarify how to interpret that section? I'm >> assuming it refers to not importing objects that share state across modules? > > Importing objects

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt
> -Original Message- > From: alan.ga...@btinternet.com > Sent: Sat, 12 Jul 2014 19:21:59 +0100 > To: tutor@python.org > Subject: Re: [Tutor] Anti-Patterns in Python Programming > > On 12/07/14 17:43, Deb Wyatt wrote: >> >>>> So much has been invent

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt
> -Original Message- > From: alan.ga...@btinternet.com > Sent: Sat, 12 Jul 2014 21:57:37 +0100 > To: tutor@python.org > Subject: Re: [Tutor] Anti-Patterns in Python Programming > > On 12/07/14 20:24, Deb Wyatt wrote: > >> CA Clipper was the main language

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Alan Gauld
On 12/07/14 20:24, Deb Wyatt wrote: CA Clipper was the main language If I recall correctly it was one of several variants on DBase? There were also Foxpro and others all sharing similar syntax. I once got a free copy of DBase4 (back in the days when we paid for compilers!) but it is still in

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt
Wow. Just wow! Thank you for all that information. That was really helpful. Thank you very much!! > What language or languages did you program with? CA Clipper was the main language I used in my former programming life (dBase compiler). A very simple, basic database manipulation language, b

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Alan Gauld
On 12/07/14 17:43, Deb Wyatt wrote: So much has been invented since my dos programming days and it is overwhelming, Actually very little has been *invented* since your DOS days. Almost everything we do today was already around back then. I knew someone was going to say that. :-) Maybe

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Steven D'Aprano
Hi Deb, My answers are interleaved with your questions. On Sat, Jul 12, 2014 at 08:43:30AM -0800, Deb Wyatt wrote: > Some questions I have at the moment: > > 1. What is functional programming? > 2. What is procedural programming? > 3. What are data patterns? > 4. What are regular expressi

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread R. Alan Monroe
> what is a hash value? Some clever person back in the 1950s realized that computers were better at numbers than names. So they came up with some gimmicks to convert names to numbers. It was probably something fancier than "a=1, b=2, etc. Now let's add up all the letters of the person's name to ma

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Mark Lawrence
On 12/07/2014 17:43, Deb Wyatt wrote: So much has been invented since my dos programming days and it is overwhelming, Actually very little has been *invented* since your DOS days. Almost everything we do today was already around back then. I knew someone was going to say that. Maybe it's t

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt
>> So much has been invented since my dos programming days and it is >> overwhelming, > > Actually very little has been *invented* since your DOS days. > Almost everything we do today was already around back then. > I knew someone was going to say that. Maybe it's the jargon that has been inven

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Alan Gauld
On 12/07/14 05:50, Deb Wyatt wrote: So much has been invented since my dos programming days and it is overwhelming, Actually very little has been *invented* since your DOS days. Almost everything we do today was already around back then. eg. - The mouse is from the 60s - Touch-screens are fro

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Joseph Lee
.@python.org] On Behalf Of Deb Wyatt Sent: Friday, July 11, 2014 3:20 PM To: tutor@python.org Subject: Re: [Tutor] Anti-Patterns in Python Programming >>>> lurkers and the like http://lignos.org/py_antipatterns/ >>>> >> Links of the format https://docs.python.org/3

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Joseph Lee
Hi Deb and others, Answers are below. -Original Message- From: Deb Wyatt [mailto:codemon...@inbox.com] Sent: Friday, July 11, 2014 9:51 PM To: Joseph Lee; tutor@python.org Subject: RE: [Tutor] Anti-Patterns in Python Programming Thank you for answering. I used to be a Clipper/dBase

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Deb Wyatt
terns in Python Programming > > Hi Deb and others, > Most are for people coming from different languages like C/C++, Java and > so > on (I myself am coming from C++ world, and can speak both C++ and > Python). > Unless if you're working on specific things, don't worry about some of > the > conce

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Steven D'Aprano
On Fri, Jul 11, 2014 at 01:04:59PM -0700, Audrey M Roy wrote: > Steven, any chance you could clarify how to interpret that section? I'm > assuming it refers to not importing objects that share state across modules? Importing objects that share state across modules was not the problem I was talkin

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Steven D'Aprano
On Fri, Jul 11, 2014 at 09:56:36AM -0700, Alex Kleider wrote: > If the part between a "with" key word and the ":" that follows it is not > an expression (and therefore can not be protected from 'end of line' by > enclosure in parentheses,) what is it? A bug in the parser. And one which is now

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Deb Wyatt
lurkers and the like http://lignos.org/py_antipatterns/ >> Links of the format https://docs.python.org/3/howto/doanddont.html are >> always up to date, the one you give is by definition 3.1 specific and so >> will never change until such time as it presumably disappears >> completely. >

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Audrey M Roy
Steven, any chance you could clarify how to interpret that section? I'm assuming it refers to not importing objects that share state across modules? Not being passive-aggressive here, just genuinely seek clarification and want to learn to be a smarter Python user. I'm on this list to learn stuff a

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Mark Lawrence
On 11/07/2014 16:07, Steven D'Aprano wrote: On Fri, Jul 11, 2014 at 02:26:26PM +0100, Mark Lawrence wrote: This one is also nice: https://docs.python.org/3.1/howto/doanddont.html What timing http://bugs.python.org/issue21956 :( I reject that bug report. The "Do And Don't" article is not pe

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Alex Kleider
On 2014-07-11 08:13, Steven D'Aprano wrote: On Fri, Jul 11, 2014 at 07:39:29AM -0700, Albert-Jan Roskam wrote: > What timing http://bugs.python.org/issue21956 :( :-) But what is 'bad advice' in this document? Does it imply that all document versions should be deleted/pulverized? (including, fo

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Mark Lawrence
On 11/07/2014 15:39, Albert-Jan Roskam wrote: - Original Message - From: Mark Lawrence To: tutor@python.org Cc: Sent: Friday, July 11, 2014 3:26 PM Subject: Re: [Tutor] Anti-Patterns in Python Programming On 10/07/2014 20:06, Mark Lawrence wrote: On 10/07/2014 19:06, Albert-Jan

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Steven D'Aprano
On Fri, Jul 11, 2014 at 07:39:29AM -0700, Albert-Jan Roskam wrote: > > What timing http://bugs.python.org/issue21956 :( > > :-) But what is 'bad advice' in this document? Does it imply that all > document versions should be deleted/pulverized? (including, for > instance, this one: https://docs.

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Steven D'Aprano
On Fri, Jul 11, 2014 at 02:26:26PM +0100, Mark Lawrence wrote: > >>This one is also nice: > >>https://docs.python.org/3.1/howto/doanddont.html > What timing http://bugs.python.org/issue21956 :( I reject that bug report. The "Do And Don't" article is not perfect, but it is broadly correct. Any s

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Albert-Jan Roskam
- Original Message - > From: Mark Lawrence > To: tutor@python.org > Cc: > Sent: Friday, July 11, 2014 3:26 PM > Subject: Re: [Tutor] Anti-Patterns in Python Programming > > On 10/07/2014 20:06, Mark Lawrence wrote: >> On 10/07/2014 19:06, Albert-Jan Ro

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Mark Lawrence
On 10/07/2014 20:06, Mark Lawrence wrote: On 10/07/2014 19:06, Albert-Jan Roskam wrote: Just came across this and thought it might be handy for newbies, lurkers and the like http://lignos.org/py_antipatterns/ This one is also nice: https://docs.python.org/3.1/howto/doanddont.html Links o

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-10 Thread Mark Lawrence
On 10/07/2014 19:06, Albert-Jan Roskam wrote: Just came across this and thought it might be handy for newbies, lurkers and the like http://lignos.org/py_antipatterns/ This one is also nice: https://docs.python.org/3.1/howto/doanddont.html Links of the format https://docs.python.org/3/how

Re: [Tutor] Anti-Patterns in Python Programming

2014-07-10 Thread Albert-Jan Roskam
>Just came across this and thought it might be handy for newbies, lurkers and >the like http://lignos.org/py_antipatterns/ > This one is also nice: https://docs.python.org/3.1/howto/doanddont.html ___ Tutor maillist - Tutor@python.org To unsubscrib

[Tutor] Anti-Patterns in Python Programming

2014-07-10 Thread Mark Lawrence
Just came across this and thought it might be handy for newbies, lurkers and the like http://lignos.org/py_antipatterns/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware bec