code units such as functionsbut it' (perhaps thecore python concept by checking for specific types in your codeyou effectively break its flexibility--you limit it to working on just one type without such testsyour code may be able to work on whole range of types this is related to the idea of polymorphism mentioned earlierand it stems from python' lack of type declarations as you'll learnin pythonwe code to object interfaces (operations supported)not to types that iswe care what an object doesnot what it is not caring about specific types means that code is automatically applicable to many of them--any object with compatible interface will workregardless of its specific type although type checking is supported--and even required in some rare cases--you'll see that it' not usually the "pythonicway of thinking in factyou'll find that polymorphism is probably the key idea behind using python well user-defined classes we'll study object-oriented programming in python--an optional but powerful feature of the language that cuts development time by supporting programming by customization--in depth later in this book in abstract termsthoughclasses define new types of objects that extend the core setso they merit passing glance here sayfor examplethat you wish to have type of object that models employees although there is no such specific core type in pythonthe following user-defined class might fit the billclass workerdef __init__(selfnamepay)self name name self pay pay def lastname(self)return self name split()[- def giveraise(selfpercent)self pay *( percentinitialize when created self is the new object split string on blanks update pay in place this class defines new kind of object that will have name and pay attributes (sometimes called state information)as well as two bits of behavior coded as functions (normally called methodscalling the class like function generates instances of our new typeand the class' methods automatically receive the instance being processed by given method call (in the self argument)bob worker('bob smith' sue worker('sue jones' bob lastname('smithsue lastname('jonessue giveraise sue pay make two instances each has name and pay attrs call methodbob is self sue is the self subject updates sue' pay other core types