node2:/tmp/20200608#cat Entity.py
class Document():
WELCOME_STR = 'Welcome! The context for this book is {}.'
@classmethod
def create_empty_book(cls, title, author):
print cls
return cls(title=title, author=author, context='nothing')
def get_a(a,b):
print self;
return a + b
node2:/tmp/20200608#cat Entity.py
# !/usr/bin/env python
# -*- coding: utf-8 -*-
class Document():
WELCOME_STR = 'Welcome! The context for this book is {}.'
def __init__(self, title, author, context):
print('init function called')
self.title = title
self.author = author
self.__context = context
#
@classmethod
def create_empty_book(cls, title, author):
print '1111111111111111111111'
print cls
print '1111111111111111111111'
return cls(title=title, author=author