Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is 'self' optional ?
#7
(Dec-06-2016, 08:11 PM)nilamo Wrote: It doesn't HAVE to be self...
class Spam(object):  
    def eggs(this):    
        this.is_not_self = True 
:p

As true as that is, i believe the OP is concerned more about the fact of anything in the parameters referring to the object, rather than what it is defined as.
Recommended Tutorials:
Reply


Messages In This Thread
is 'self' optional ? - by meems - Nov-25-2016, 08:33 PM
RE: is 'self' optional ? - by metulburr - Nov-25-2016, 09:36 PM
RE: is 'self' optional ? - by Ofnuts - Nov-25-2016, 09:39 PM
RE: is 'self' optional ? - by meems - Nov-26-2016, 12:45 AM
RE: is 'self' optional ? - by metulburr - Nov-26-2016, 02:13 AM
RE: is 'self' optional ? - by nilamo - Dec-06-2016, 08:11 PM
RE: is 'self' optional ? - by metulburr - Dec-06-2016, 08:53 PM
RE: is 'self' optional ? - by nilamo - Dec-06-2016, 10:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  using mutable in function defintion as optional paramter akbarza 8 482 Apr-27-2024, 09:59 PM
Last Post: snippsat
  Trouble making an argument optional linuxnoob 2 2,944 Aug-31-2018, 01:52 AM
Last Post: linuxnoob

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020