Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit96590be

Browse files
Neil Leetrekhleb
Neil Lee
authored andcommitted
Added simple descriptions to files missing descriptions (trekhleb#9)
* Added simple descriptions to files missing descriptions at the top of the files.Added simple descriptions/summary for test_class_objects.py, test_inheritance.py, test_method_objects.py, test_multiple_inheritance.py, test_file_methdos.py, test_file_reading.py, test_math.py* removed trailing spaces
1 parent446c66c commit96590be

File tree

7 files changed

+21
-0
lines changed

7 files changed

+21
-0
lines changed

‎src/classes/test_class_objects.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Class Definition Syntax.
22
33
@see: https://docs.python.org/3/tutorial/classes.html#class-objects
4+
5+
After defining the class attributes to a class, the class object can be created by assigning the
6+
object to a variable. The created object would have instance attributes associated with it.
47
"""
58

69

‎src/classes/test_inheritance.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Inheritance
22
33
@see: https://docs.python.org/3/tutorial/classes.html#inheritance
4+
5+
Inheritance is one of the principles of object-oriented programming. Since classes may share a lot
6+
of the same code, inheritance allows a derived class to reuse the same code and modify accordingly
47
"""
58

69

‎src/classes/test_method_objects.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Class Definition Syntax.
22
33
@see: https://docs.python.org/3/tutorial/classes.html#method-objects
4+
5+
Classes can have two types of attribute references: data or methods. Class methods are called
6+
by [variable_name].[method_name]([parameters]) as opposed to class data which lacks the ().
47
"""
58

69

‎src/classes/test_multiple_inheritance.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Multiple Inheritance
22
33
@see: https://docs.python.org/3/tutorial/classes.html#multiple-inheritance
4+
5+
Some classes may derive from multiple classes. This means that the derived class would have
6+
its attributes, along with the attributes of all the classes that it was derived from.
47
"""
58

69

‎src/files/test_file_methdos.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Methods of File Objects
22
33
@see: https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects
4+
5+
Reading from a file does not always have to be sequential. There are methods to look for
6+
specific locations in the file, much like flipping to a page in a book.
47
"""
58

69

‎src/files/test_file_reading.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
"""Reading and Writing Files
22
33
@see: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
4+
5+
The process of reading and writing to a file is like finding a book and opening a book.
6+
First, the file is located, opened to the first page, then reading/writing begins until it reaches
7+
the end of the file.
48
"""
59

610

‎src/standard_libraries/test_math.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Math.
22
33
@see: https://docs.python.org/3/tutorial/stdlib.html#mathematics
4+
5+
Math module is useful as many math functions are already implemented and optimized.
46
"""
57

68
importmath

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp