downloading the example code you can download the example code files for all packt books you have purchased from your account at if you purchased this book elsewhereyou can visit packtpub com/support and register to have the files -mailed directly to you adding attributes nowwe have basic classbut it' fairly useless it doesn' contain any dataand it doesn' do anything what do we have to do to assign an attribute to given objectit turns out that we don' have to do anything special in the class definition we can set arbitrary attributes on an instantiated object using the dot notationclass pointpass point( point( print( xp yprint( xp yif we run this codethe two print statements at the end tell us the new attribute values on the two objects this code creates an empty point class with no data or behaviors then it creates two instances of that class and assigns each of those instances and coordinates to identify point in two dimensions all we need to do to assign value to an attribute on an object is use the syntax this is sometimes referred to as dot notation the value can be anythinga python primitivea built-in data typeor another object it can even be function or another class