Skip to content

Commit a7aa3f3

Browse files
authored
Update homepage for v0.9.0 (#180)
1 parent 452f534 commit a7aa3f3

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.9.0](https://github.com/tfpf/pysorteddict/compare/v0.8.2...v0.9.0)
4+
5+
<ul class="change-new">
6+
<li><a href="https://github.com/tfpf/pysorteddict/pull/179">#179</a> Define <code>SortedDict.__iter__</code>.</li>
7+
</ul>
8+
39
## [0.8.2](https://github.com/tfpf/pysorteddict/compare/v0.8.1...v0.8.2)
410

511
<ul class="change-fix">

docs/documentation.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<summary>Documentation of older versions is available on GitHub.</summary>
66

7+
[0.8.2](https://github.com/tfpf/pysorteddict/blob/v0.8.2/docs/documentation.md)
78
[0.8.1](https://github.com/tfpf/pysorteddict/blob/v0.8.1/docs/documentation.md)
89
[0.8.0](https://github.com/tfpf/pysorteddict/blob/v0.8.0/docs/documentation.md)
910
[0.7.3](https://github.com/tfpf/pysorteddict/blob/v0.7.3/docs/documentation.md)
@@ -443,6 +444,26 @@ Uncommenting the commented line runs any required destructors and makes this err
443444

444445
</details>
445446

447+
#### `iter(d)`
448+
449+
Return an iterator over the keys in the sorted dictionary `d`. This is an efficient shorthand for `iter(d.keys())`.
450+
451+
```python
452+
from pysorteddict import *
453+
d = SortedDict()
454+
d["foo"] = ()
455+
d["bar"] = [100]
456+
d["baz"] = 3.14
457+
for key in d:
458+
print(key)
459+
```
460+
461+
```text
462+
bar
463+
baz
464+
foo
465+
```
466+
446467
### Other Methods
447468

448469
#### `d.clear()`
@@ -559,33 +580,24 @@ Return a human-readable representation of the sorted dictionary view `v`.
559580

560581
Return the length of the sorted dictionary view `v`.
561582

562-
<details class="warning">
563-
564-
<summary>This method may raise exceptions.</summary>
565-
566-
If `v` is of type `SortedDictKeys`, the behaviour is equivalent to that of [`len(d)`](#lend) where `d` is the
567-
underlying sorted dictionary.
568-
569-
</details>
583+
The behaviour is equivalent to that of [`len(d)`](#lend) where `d` is the underlying sorted dictionary.
570584

571585
#### `ob in v`
572586

573587
Return whether `ob` is present in the sorted dictionary view `v`.
574588

575-
<details class="warning">
576-
577-
<summary>This method may raise exceptions.</summary>
578-
579589
If `v` is of type `SortedDictKeys`, the behaviour is equivalent to that of [`ob in d`](#key-in-d) where `d` is the
580590
underlying sorted dictionary.
581591

582-
</details>
583-
584592
#### `v[pos]` or `v[start:stop:step]`
585593

586594
Return the element at position `pos` or a `list` of elements in the slice denoted by `start`, `stop` and `step` in the
587595
sorted dictionary view `v`.
588596

597+
The behaviour is equivalent to that of `l[pos]` or `l[start:stop:step]` respectively where `l` is a `list` of the
598+
elements in `v` in the same order. In the second form, `start`, `stop` and `step` can be omitted, just
599+
like when slicing a `list`.
600+
589601
```python
590602
from pysorteddict import *
591603
d = SortedDict()
@@ -612,15 +624,6 @@ bar eggs spam
612624
['spam', 'foo', 'eggs', 'baz', 'bar']
613625
```
614626

615-
<details class="warning">
616-
617-
<summary>This method may raise exceptions.</summary>
618-
619-
The behaviour is equivalent to that of `l[pos]` or `l[start:stop:step]` respectively where `l` is a `list` containing
620-
the same elements as `v`.
621-
622-
</details>
623-
624627
#### `iter(v)`
625628

626629
Return an iterator over the sorted dictionary view `v`.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
88

99
[project]
1010
name = "pysorteddict"
11-
version = "0.8.2"
11+
version = "0.9.0"
1212
authors = [
1313
{name = "Vishal Pankaj Chandratreya"},
1414
]

0 commit comments

Comments
 (0)