assignsfilter out the double-underscore names as we've done beforein ' dir coverage and ' built-in scope coveragelist(name for name in module __dict__ keys(if not name startswith('__')['func''klass''name''sys'list(name for name in module __dict__ if not name startswith('__')['func''sys''name''klass'this time we're filtering with generator instead of list comprehensionand can omit the keys(because dictionaries generate their keys automatically though implicitlythe effect is the same we'll see similar __dict__ dictionaries on class-related objects in part vi too in both casesattribute fetch is similar to dictionary indexingthough only the former kicks off inheritance in classesmodule namemodule __dict__['name'( attribute name qualification speaking of attribute fetchnow that you're becoming more familiar with moduleswe should firm up the notion of name qualification more formally too in pythonyou can access the attributes of any object that has attributes using the qualification ( attribute fetchsyntax object attribute qualification is really an expression that returns the value assigned to an attribute name associated with an object for examplethe expression module sys in the previous example fetches the value assigned to sys in module similarlyif we have built-in list object ll append returns the append method object associated with that list it' important to keep in mind that attribute qualification has nothing to do with the scope rules we studied in it' an independent concept when you use qualification to access namesyou give python an explicit object from which to fetch the specified names the legb scope rule applies only to bareunqualified names--it may be used for the leftmost name in name pathbut later names after dots search specific objects instead here are the rulessimple variables means search for the name in the current scopes (following the legb rule of qualification means find in the current scopesthen search for the attribute in the object (not in scopesqualification paths means look up the name in the object xthen look up in the object module namespaces