Re: [Tutor] class variables

2013-12-20 Thread Steven D'Aprano
On Fri, Dec 20, 2013 at 02:04:49AM -0500, Keith Winston wrote: > I am a little confused about class variables: I feel like I've repeatedly > seen statements like this: I don't like the terms "class variable" and "instance variable". In the Python community, these are usually called class and inst

Re: [Tutor] Stuck on error

2013-12-20 Thread Joel Goldstick
On Fri, Dec 20, 2013 at 1:27 PM, Joel Goldstick wrote: > > > > On Fri, Dec 20, 2013 at 11:36 AM, NZHacker1 . wrote: > >> I'm trying to make a lottery in python and i keep getting this error. >> Cant assign to operator.(Mega Millions, line 47) >> > > That isn't your code, or that isn't your error m

Re: [Tutor] Stuck on error

2013-12-20 Thread Alan Gauld
On 20/12/13 16:36, NZHacker1 . wrote: I'm trying to make a lottery in python and i keep getting this error. Cant assign to operator.(Mega Millions, line 47) Please always send the full error message not just the last part. There is a lot of useful data missing here. Here's the code. import r

Re: [Tutor] Stuck on error

2013-12-20 Thread Joel Goldstick
On Fri, Dec 20, 2013 at 11:36 AM, NZHacker1 . wrote: > I'm trying to make a lottery in python and i keep getting this error. Cant > assign to operator.(Mega Millions, line 47) > That isn't your code, or that isn't your error message. Cut and paste your actual code and your actual traceback. Wh

Re: [Tutor] menu-libre broken? :p:

2013-12-20 Thread Pierre Dagenais
On 13-12-20 05:59 AM, Paradox wrote: > > On 12/19/2013 10:46 PM, Keith Winston wrote: >> I did this sequence of commands: >> >> sudo add-apt-repository ppa:menulibre-dev/devel >> sudo apt-get update >> sudo apt-get install menulibre >> >> But at the end of the update I got: >> >> W: Failed to fe

[Tutor] Stuck on error

2013-12-20 Thread NZHacker1 .
I'm trying to make a lottery in python and i keep getting this error. Cant assign to operator.(Mega Millions, line 47) Here's the code. import random for i in range(1): RN1 = random.randint(1,75) for i in range(1): RN2 = random.randint(1,75) for i in range(1): RN3 = random.randint

[Tutor] Linux vs. Python

2013-12-20 Thread Keith Winston
On Fri, Dec 20, 2013 at 6:00 AM, wrote: > This looks more like an Ubuntu issue than a Python one? > Did you mean to send it to the tutor list? > Oops. Sorry -- Keith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription optio

Re: [Tutor] Tutor Digest, Vol 118, Issue 95

2013-12-20 Thread Mark Lawrence
On 20/12/2013 01:21, Keith Winston wrote: On Thu, Dec 19, 2013 at 5:58 PM, mailto:tutor-requ...@python.org>> wrote: > So... is there any way to go back up to the previous line and correct the > syntax? As it is now we are starting the entire file over. It's really > cumb

Re: [Tutor] class variables

2013-12-20 Thread eryksun
On Fri, Dec 20, 2013 at 5:20 AM, Alan Gauld wrote: > > Similarly if you have a name defined within the instance it will use that if > not it will look in the class. An instance can generally shadow class attributes, except properties and other data descriptors defined by the class are given prece

Re: [Tutor] menu-libre broken? :p:

2013-12-20 Thread Paradox
On 12/19/2013 10:46 PM, Keith Winston wrote: I did this sequence of commands: sudo add-apt-repository ppa:menulibre-dev/devel sudo apt-get update sudo apt-get install menulibre But at the end of the update I got: W: Failed to fetch http://ppa.launchpad.net/menulibre-dev/devel/ubuntu/dists/sau

Re: [Tutor] menu-libre broken?

2013-12-20 Thread Alan Gauld
On 20/12/13 03:46, Keith Winston wrote: I did this sequence of commands: sudo add-apt-repository ppa:menulibre-dev/devel sudo apt-get update sudo apt-get install menulibre This looks more like an Ubuntu issue than a Python one? Did you mean to send it to the tutor list? -- Alan G Author of t

Re: [Tutor] class variables

2013-12-20 Thread Alan Gauld
On 20/12/13 07:04, Keith Winston wrote: Class.pi == 3.14 # defined/set in the class def instance.pi == 3.14 # initially instance.pi = 4 # oops, changed it Class.pi == 3.14 # still Class.pi = "rhubarb" # oops, there I go again instance.pi == 4 # still Sorry if I'm beating this to a pulp, I

Re: [Tutor] class variables

2013-12-20 Thread Dominik George
Hi, > I am a little confused about class variables: I feel like I've repeatedly > seen statements like this: please take a look at the archives - this topic has been discussed on this list recently. -nik -- * mirabilos is handling my post-1990 smartphone * Aaah, it vibrates! Wherefore art tho

[Tutor] class variables

2013-12-20 Thread Keith Winston
I am a little confused about class variables: I feel like I've repeatedly seen statements like this: There is only one copy of the class variable and when any one object makes a change to a class variable, that change will be seen by all the other instances. Object variables are owned by each indi

[Tutor] menu-libre broken?

2013-12-20 Thread Keith Winston
I did this sequence of commands: sudo add-apt-repository ppa:menulibre-dev/devel sudo apt-get update sudo apt-get install menulibre But at the end of the update I got: W: Failed to fetch http://ppa.launchpad.net/menulibre-dev/devel/ubuntu/dists/saucy/main/source/Sources 404 Not Found W: Failed

Re: [Tutor] Tutor Digest, Vol 118, Issue 95

2013-12-20 Thread Keith Winston
On Thu, Dec 19, 2013 at 5:58 PM, wrote: > > So... is there any way to go back up to the previous line and correct the > > syntax? As it is now we are starting the entire file over. It's really > > cumbersome. Is it supposed to be this way? > I notice "Python for Kids" uses Python 3.2, and (p.