+ sync utils

This commit is contained in:
tmshv committed 2016-01-09 17:59:42 +03:00
1 parent 238e4b9682
commit 0693e7c758
10 files changed
+736

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
__author__ = 'Roman Timashev'
class Album:
def __init__(self, type, title, uri, course, course_uri, date, teacher, comment):
super().__init__()
self.products = []
self.type = type
self.title = title
self.uri = uri
self.course = course
self.course_uri = course_uri
self.date = date
self.teacher = teacher
self.comment = comment
def add_product(self, product):
self.products.append(product)
def __repr__(self, *args, **kwargs):
return '[%s by %s (%d items)]' % (self.title, self.teacher, len(self.products))