Skip to content

Commit

Permalink
Updated pots
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed Aug 13, 2012
1 parent 01ddf74 commit b25d3b5
Show file tree
Hide file tree
Showing 20 changed files with 746 additions and 730 deletions.
4 changes: 2 additions & 2 deletions pot/Appendix.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down
4 changes: 2 additions & 2 deletions pot/Author_Group.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down
12 changes: 6 additions & 6 deletions pot/Book_Info.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand All @@ -17,13 +17,13 @@ msgstr ""
msgid "Python for you and me"
msgstr ""

#. Tag: para
#. Tag: subtitle
#, no-c-format
msgid "This book is for the python newbies"
msgid "A book to learn Python in a quick way"
msgstr ""

#. Tag: phrase
#. Tag: para
#, no-c-format
msgid "Logo"
msgid "This book is for the python newbies"
msgstr ""

4 changes: 2 additions & 2 deletions pot/Chapter.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down
4 changes: 2 additions & 2 deletions pot/Preface.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down
4 changes: 2 additions & 2 deletions pot/Python_for_you_and_me.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down
9 changes: 7 additions & 2 deletions pot/Revision_History.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand All @@ -22,6 +22,11 @@ msgstr ""
msgid "Das"
msgstr ""

#. Tag: member
#, no-c-format
msgid "Work in progress"
msgstr ""

#. Tag: member
#, no-c-format
msgid "First release"
Expand Down
4 changes: 2 additions & 2 deletions pot/acknowledgment.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down
153 changes: 82 additions & 71 deletions pot/classes.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: 0\n"
"POT-Creation-Date: 2011-11-05T11:20:40\n"
"PO-Revision-Date: 2011-11-05T11:20:40\n"
"POT-Creation-Date: 2012-08-13T13:28:38\n"
"PO-Revision-Date: 2012-08-13T13:28:38\n"
"Last-Translator: Automatically generated\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -37,11 +37,9 @@ msgstr ""
msgid "Before writing your first class, you should know the syntax. We define a class in the following way.."
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
"class nameoftheclass:\n"
msgid "class nameoftheclass:\n"
" statement1\n"
" statement2\n"
" statement3\n"
Expand All @@ -54,11 +52,9 @@ msgstr ""
msgid "in the statements you can write any python statement, you can define functions (which we call methods of a class)."
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
">>> class MyClass:\n"
msgid ">>> class MyClass:\n"
"... a = 90\n"
"... b = 88\n"
"...\n"
Expand All @@ -74,11 +70,9 @@ msgstr ""
msgid "In the above example you can see first we are declaring a class called MyClass, writing some random statements inside that class. After the class definition, we are creating an <emphasis>object</emphasis> p of the <emphasis>class</emphasis> MyClass.If you do a dir on that..."
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
"&gt;&gt;&gt; dir(p)\n"
msgid "&gt;&gt;&gt; dir(p)\n"
"['__doc__', '__module__', 'a', 'b']\n"
"\n"
""
Expand All @@ -99,21 +93,36 @@ msgstr ""
msgid "__init__ is a special method in python classes, it is the constructor method for a class. In the following example you can see how to use it"
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
msgid "class Student(object):\n"
" \"\"\"\n"
" Returns a ```Student``` object with the given name, branch and year. \n"
" \n"
" \"\"\"\n"
" def __init__(self, name, branch, year):\n"
" self.name = name\n"
" self.branch = branch\n"
" self.year = year\n"
" print \"A student object is created\"\n"
"\n"
"&gt;&gt;&gt; class Student:\n"
"... def __init__(self, name, branch, year):\n"
"... self.name = name\n"
"... self.branch = branch\n"
"... self.year = year\n"
"... print \"A student object is created\"\n"
"... def getName(self):\n"
"... return self.name\n"
"... def setName(self, name):\n"
"... self.name = name\n"
"...\n"
" def set_name(self, name):\n"
" \"\"\"\n"
" Sets the name of the student.\n"
"\n"
" :arg name: new name ofthe student.\n"
" \n"
" \"\"\"\n"
" self.name = name\n"
"\n"
" def get_name(self):\n"
" \"\"\"\n"
" Returns the name of the student.\n"
" \n"
" :return: a string contain the student's name\n"
"\n"
" \"\"\"\n"
" return self.name\n"
"\n"
""
msgstr ""
Expand All @@ -123,11 +132,9 @@ msgstr ""
msgid "__init__ is called when ever an object of the class is constructed.That means when ever we will create a student object we will see the message \"Creating a new student\" in the prompt. You can see the first argument to the method is <emphasis>self</emphasis>. It is a special variable which points to the current object (like `this` in C++). The object is passed implicitly to every method available in it , but we have to get it explicitly in every method while writing the methods. Example shown below."
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
"&gt;&gt;&gt; std1 = Student()\n"
msgid "&gt;&gt;&gt; std1 = Student()\n"
"Traceback (most recent call last):\n"
" File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n"
"TypeError: __init__() takes exactly 4 arguments (1 given)\n"
Expand All @@ -147,18 +154,16 @@ msgstr ""
msgid "Now we are going to call <emphasis>getName()</emphasis> and <emphasis>setName()</emphasis> methods."
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
"&gt;&gt;&gt; std1.getName()\n"
msgid "&gt;&gt;&gt; std1.get_name()\n"
"'Kushal'\n"
"&gt;&gt;&gt; std1.setName()\n"
"&gt;&gt;&gt; std1.set_name()\n"
"Traceback (most recent call last):\n"
" File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n"
"TypeError: setName() takes exactly 2 arguments (1 given)\n"
"&gt;&gt;&gt; std1.setName('Shreyank Gupta')\n"
"&gt;&gt;&gt; std1.getName()\n"
"TypeError: set_name() takes exactly 2 arguments (1 given)\n"
"&gt;&gt;&gt; std1.set_name('Shreyank Gupta')\n"
"&gt;&gt;&gt; std1.get_name()\n"
"'Shreyank Gupta'\n"
"\n"
""
Expand Down Expand Up @@ -189,46 +194,58 @@ msgstr ""
msgid "student_teacher.py"
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
msgid "#!/usr/bin/env python\n"
"\n"
"#!/usr/bin/env python\n"
"class Person(object):\n"
" \"\"\"\n"
" Returns a ```Person``` object with given name.\n"
"\n"
"class Person:\n"
" \"\"\"\n"
" def __init__(self,name):\n"
" self.name = name\n"
"\n"
" def getDetails(self):\n"
" def get_details(self):\n"
" \"Returns a string containing name of the person\"\n"
" return self.name\n"
"\n"
"\n"
"class Student(Person):\n"
" \"\"\"\n"
" Returns a ```Student``` object, takes 3 arguments, name, branch, year.\n"
" \n"
" \"\"\"\n"
" def __init__(self,name,branch,year):\n"
" Person.__init__(self,name)\n"
" self.branch = branch\n"
" self.year = year\n"
"\n"
" def getDetails(self):\n"
" return (self.name, self.branch, self.year)\n"
" def get_details(self):\n"
" \"Returns a string containing student's details.\"\n"
" return \"%s studies %s and is in %s year.\" % (self.name, self.branch, self.year)\n"
"\n"
"\n"
"class Teacher(Person):\n"
" def __init__(self,name,papers):\n"
" Person.__init__(self,name)\n"
" \"\"\"\n"
" Returns a ```Teacher``` object, takes a list of strings (list of papers) as\n"
" argument.\n"
" \"\"\" \n"
" def __init__(self, name, papers):\n"
" Person.__init__(self, name)\n"
" self.papers = papers\n"
"\n"
" def getDetails(self):\n"
" return (self.name, self.papers)\n"
" def get_details(self):\n"
" return \"%s teaches %s\" % (self.name, ','.join(self.papers))\n"
"\n"
"\n"
"person1 = Person('Rahul')\n"
"student1 = Student('Kushal','CSE',2005)\n"
"teacher1 = Teacher('Prashad',['C','C++'])\n"
"person1 = Person('Sachin')\n"
"student1 = Student('Kushal', 'CSE', 2005)\n"
"teacher1 = Teacher('Prashad', ['C', 'C++'])\n"
"\n"
"print person1.getDetails()\n"
"print student1.getDetails()\n"
"print teacher1.getDetails()\n"
"print person1.get_details()\n"
"print student1.get_details()\n"
"print teacher1.get_details()\n"
"\n"
"\n"
""
Expand All @@ -241,20 +258,18 @@ msgstr ""

#. Tag: screen
#, no-c-format
msgid "\n"
"\n"
"[kdas@kdas code]$ ./student_teacher.py\n"
"Rahul\n"
"('Kushal', 'CSE', 2005)\n"
"('Prashad', ['C', 'C++'])\n"
msgid "$ ./student_teacher.py \n"
"Sachin\n"
"Kushal studies CSE and is in 2005 year.\n"
"Prashad teaches C,C++\n"
"\n"
"\n"
""
msgstr ""

#. Tag: para
#, no-c-format
msgid "In this example you can see how we called the __init__ method of the class Person in both Studentা and Teacher classes' __init__ method. We also reimplemented <emphasis>getDetails()</emphasis> method of Person class in both Student and Teacher class. So, when we are calling <emphasis>getDetails()</emphasis> method on the teacher1 object it returns based on the object itself (which is of teacher class) and when we call <emphasis>getDetails()</emphasis> on the student1 or person1 object it returns based on <emphasis>getDetails()</emphasis> method implemented in it's own class."
msgid "In this example you can see how we called the __init__ method of the class Person in both Student and Teacher classes' __init__ method. We also reimplemented <emphasis>get_details()</emphasis> method of Person class in both Student and Teacher class. So, when we are calling <emphasis>get_details()</emphasis> method on the teacher1 object it returns based on the object itself (which is of teacher class) and when we call <emphasis>get_details()</emphasis> on the student1 or person1 object it returns based on <emphasis>get_details()</emphasis> method implemented in it's own class."
msgstr ""

#. Tag: title
Expand All @@ -267,11 +282,9 @@ msgstr ""
msgid "One class can inherit more than one classes. It gets access to all methods and variables of the parent classes. The general syntax is:"
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
"class MyClass(Parentclass1, Parentclass2,...):\n"
msgid "class MyClass(Parentclass1, Parentclass2,...):\n"
" def __init__(self):\n"
" Parentclass1.__init__(self)\n"
" Parentclass2.__init__(self)\n"
Expand All @@ -291,11 +304,9 @@ msgstr ""
msgid "As we already know how to create an object , now we are going to see how to delete an python object. We use <emphasis>del</emphasis> for this."
msgstr ""

#. Tag: screen
#. Tag: programlisting
#, no-c-format
msgid "\n"
"\n"
"&gt;&gt;&gt; s = \"I love you\"\n"
msgid "&gt;&gt;&gt; s = \"I love you\"\n"
"&gt;&gt;&gt; del s\n"
"&gt;&gt;&gt; s\n"
"Traceback (most recent call last):\n"
Expand Down
Loading

0 comments on commit b25d3b5

Please sign in to comment.