'bobsamebut pass to self rec method( 'suecan call through instance or class normallyclasses are filled out by class statementsand instance attributes are created by assignments to self attributes in method functions the point againthoughis that they don' have to beoop in python really is mostly about looking up attributes in linked namespace objects records revisitedclasses versus dictionaries although the simple classes of the prior section are meant to illustrate class model basicsthe techniques they employ can also be used for real work for example and showed how to use dictionariestuplesand lists to record properties of entities in our programsgenerically called records it turns out that classes can often serve better in this role--they package information like dictionariesbut can also bundle processing logic in the form of methods for referencehere is an example for tupleand dictionary-based records we used earlier in the book (using one of many dictionary coding techniques)rec ('bob' ['dev''mgr']print(rec[ ]bob rec {rec['name''bobrec['age' rec['jobs'['dev''mgr'print(rec['name']bob tuple-based record dictionary-based record or }dict( = )etc this code emulates tools like records in other languages as we just sawthoughthere are also multiple ways to do the same with classes perhaps the simplest is this--trading keys for attributesclass recpass rec name 'bobrec age rec jobs ['dev''mgr'class-based record in factthis is one of the reasons the self argument must always be explicit in python methods--because methods can be created as simple functions independent of classthey need to make the implied instance argument explicit they can be called as either functions or methodsand python can neither guess nor assume that simple function might eventually become class' method the main reason for the explicit self argumentthoughis to make the meanings of names more obviousnames not referenced through self are simple variables mapped to scopeswhile names referenced through self with attribute notation are obviously instance attributes class coding basics