On 24/04/2019 12:22, Arup Rakshit wrote:
> In the simple code like what are the advantages we get from?
I'm not really sure what you are asking about?
> Is this so that we can implement more special methods
> than just __getattr__ and __dir__ in the module level?
Is it just the inheritance
In the simple code like what are the advantages we get from? Is this so that we
can implement more special methods than just __getattr__ and __dir__ in the
module level?
import sys
from types import ModuleType
class VerboseModule(ModuleType):
def __repr__(self):
return f'Verbose
On 24/04/2019 00:31, Bob Griffin wrote:
> Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)]
> on win32
> Type "copyright", "credits" or "license()" for more information.
print("Game Over")
> Game Over
> When I run the program and get a syntac error invalid
Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on
win32
Type "copyright", "credits" or "license()" for more information.
>>> print("Game Over")
Game Over
>>>
Sent from Mail for Windows 10
Each time I write the program in Python from the book Python Programming,