Learning Python - Alfa Romeo Forum
You are currently unregistered, register for more features.    
The Technology Section A place to discuss technology & gadgets.

 2Likes
  • 1 Post By TheGrimJeeper
  • 1 Post By David WB
 
Thread Tools
(Post Link) post #1 of 4 Old 31-08-17 Thread Starter
Status: T-5 Days to Unicorn Paradise
AO Platinum Member
 
TheGrimJeeper's Avatar
 
Join Date: Sep 2009
Location: France
County: Riviera
Posts: 38,319
Learning Python

Still ploughing through python tutorials.

Today it's using classes.



Poor Stumpy !!!


class Cat:
def __init__(self, color, legs):
self.color = color
self.legs = legs




felix = Cat("ginger", 4)
rover = Cat("dog-colored", 4)
stumpy = Cat("brown", 3)



Al Faromeo likes this.
TheGrimJeeper is offline  
Sponsored Links
Advertisement
 
Status: Sticking up for MGs everywhere!
AO Silver Member
 
David WB's Avatar
 
Join Date: Apr 2014
Location: United Kingdom
County: Lancaster
Posts: 3,769

Member car:

147 & GQV



(Not) finding nans using the numpy package is so much harder than using IDL/ENVI.

whr = ( np.isnan(data) == False )

I love the quality of the postscript plots. But seriously:

a.this, ax.that, ax.f***off!...

David WB is offline  
(Post Link) post #3 of 4 Old 31-08-17 Thread Starter
Status: T-5 Days to Unicorn Paradise
AO Platinum Member
 
TheGrimJeeper's Avatar
 
Join Date: Sep 2009
Location: France
County: Riviera
Posts: 38,319
I called it the numpty package.
TheGrimJeeper is offline  
Status: Sticking up for MGs everywhere!
AO Silver Member
 
David WB's Avatar
 
Join Date: Apr 2014
Location: United Kingdom
County: Lancaster
Posts: 3,769

Member car:

147 & GQV

And with regard to the classes within the objects:

__________________________________________________ _____this_________________________________________ ______________()

Seriously...

I may start a club called (I)PyMoaner.
TheGrimJeeper likes this.
David WB is offline  
Reply

Go Back   Alfa Romeo Forum > Misc Lounges > Community Discussions > The Technology Section

Tags
learning , python

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

 
For the best viewing experience please update your browser to Google Chrome