Skip to content

Commit 807f07e

Browse files
authored
Improved examples in doc strings (#123)
1 parent 4d35068 commit 807f07e

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ PyDataStructs
44
[![Build Status](https://travis-ci.org/codezonediitj/pydatastructs.png?branch=master)](https://travis-ci.org/codezonediitj/pydatastructs) [![Join the chat at https://gitter.im/codezonediitj/pydatastructs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/codezoned2017/Lobby) [![Discuss at [email protected]](https://img.shields.io/badge/discuss-pydatastructs%40googlegroups.com-blue.svg)](https://groups.google.com/forum/#!forum/pydatastructs) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/codezonediitj/pydatastructs/pulls) [![codecov](https://codecov.io/gh/codezonediitj/pydatastructs/branch/master/graph/badge.svg)](https://codecov.io/gh/codezonediitj/pydatastructs)
55

66
About
7-
-----------
7+
-----
88

9-
Currently, the aim of the project is to be a Python package for various data structures in computer science. In addition, we are also working on including parallel algorithms. To the best of our knowledge a well designed library/package which has covered most of the data structures and algorithms including their parallel implementation doesn't exist.
9+
Currently, the project aims to be a Python package for various data structures in computer science. Besides, we are also working on including parallel algorithms. To the best of our knowledge, a well-designed library/package which has covered most of the data structures and algorithms including their parallel implementation doesn't exist.
1010

1111
In future, i.e, after a few releases of the package when the software design will become stable, we also aim to provide APIs for the code in C++ and Java as well.
1212

@@ -19,7 +19,7 @@ You can install the library by running the following command,
1919
python3 setup.py install
2020
```
2121

22-
For development purposes you can use the option `develop` as shown below,
22+
For development purposes, you can use the option `develop` as shown below,
2323

2424
```python
2525
python3 setup.py develop
@@ -57,7 +57,7 @@ Follow the steps given below,
5757
8. Execute, `git add .`.
5858
9. Execute, `git commit -m "your-commit-message"`.
5959
10. Execute, `git push origin_user <your-current-branch>`.
60-
11. Make a PR.
60+
11. Make PR.
6161

6262
That's it, 10 easy steps for your first contribution. For future contributions just follow steps 5 to 10. Make sure that before starting work, always checkout to master and pull the recent changes using the remote `origin` and then start following steps 5 to 10.
6363

@@ -79,6 +79,6 @@ The following parameters are to be followed to pass the code quality tests for y
7979
1. There should not be any trailing white spaces at any line of code.
8080
2. Each `.py` file should end with exactly one new line.
8181
3. Comparisons involving `True`, `False` and `None` should be done by
82-
reference(using `is`, `is not`) and not by value(`==`, `!=`).
82+
reference (using `is`, `is not`) and not by value(`==`, `!=`).
8383

8484
Keep contributing!!

pydatastructs/linear_data_structures/linked_lists.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ class DoublyLinkedList(LinkedList):
4949
6
5050
>>> dll.append(5)
5151
>>> dll.append_left(2)
52-
>>> print(dll)
53-
[2, 6, 5]
52+
>>> str(dll)
53+
'[2, 6, 5]'
5454
>>> dll[0].data = 7.2
5555
>>> dll.extract(1).data
5656
6
57-
>>> print(dll)
58-
[7.2, 5]
57+
>>> str(dll)
58+
'[7.2, 5]'
5959
6060
References
6161
==========
@@ -306,13 +306,13 @@ class SinglyLinkedList(LinkedList):
306306
6
307307
>>> sll.append(5)
308308
>>> sll.append_left(2)
309-
>>> print(sll)
310-
[2, 6, 5]
309+
>>> str(sll)
310+
'[2, 6, 5]'
311311
>>> sll[0].data = 7.2
312312
>>> sll.extract(1).data
313313
6
314-
>>> print(sll)
315-
[7.2, 5]
314+
>>> str(sll)
315+
'[7.2, 5]'
316316
317317
References
318318
==========
@@ -530,13 +530,13 @@ class SinglyCircularLinkedList(SinglyLinkedList):
530530
6
531531
>>> scll.append(5)
532532
>>> scll.append_left(2)
533-
>>> print(scll)
534-
[2, 6, 5]
533+
>>> str(scll)
534+
'[2, 6, 5]'
535535
>>> scll[0].data = 7.2
536536
>>> scll.extract(1).data
537537
6
538-
>>> print(scll)
539-
[7.2, 5]
538+
>>> str(scll)
539+
'[7.2, 5]'
540540
541541
References
542542
==========
@@ -624,13 +624,13 @@ class DoublyCircularLinkedList(DoublyLinkedList):
624624
6
625625
>>> dcll.append(5)
626626
>>> dcll.append_left(2)
627-
>>> print(dcll)
628-
[2, 6, 5]
627+
>>> str(dcll)
628+
'[2, 6, 5]'
629629
>>> dcll[0].data = 7.2
630630
>>> dcll.extract(1).data
631631
6
632-
>>> print(dcll)
633-
[7.2, 5]
632+
>>> str(dcll)
633+
'[7.2, 5]'
634634
635635
References
636636
==========

0 commit comments

Comments
 (0)