Skip to content

Commit

Permalink
Deploying to gh-pages from @ 1a30c43 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cschan1828 committed Jun 2, 2024
1 parent c698d13 commit 30f72ee
Show file tree
Hide file tree
Showing 529 changed files with 559 additions and 542 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 245d3ca516eb8b760ee179bdc9c9e27a
config: b5f2ce9acaa5f47f79bb65a7af64d2e7
tags: 645f666f9bcd5a90fca523b33c5a78b7
16 changes: 14 additions & 2 deletions _sources/library/itertools.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,15 +849,15 @@ and :term:`generators <generator>` which incur interpreter overhead.
return len(take(2, groupby(iterable, key))) <= 1

def unique_justseen(iterable, key=None):
"List unique elements, preserving order. Remember only the element just seen."
"Yield unique elements, preserving order. Remember only the element just seen."
# unique_justseen('AAAABBBCCDAABBB') → A B C D A B
# unique_justseen('ABBcCAD', str.casefold) → A B c A D
if key is None:
return map(operator.itemgetter(0), groupby(iterable))
return map(next, map(operator.itemgetter(1), groupby(iterable, key)))

def unique_everseen(iterable, key=None):
"List unique elements, preserving order. Remember all elements ever seen."
"Yield unique elements, preserving order. Remember all elements ever seen."
# unique_everseen('AAAABBBCCDAABBB') → A B C D
# unique_everseen('ABBcCAD', str.casefold) → A B c D
seen = set()
Expand All @@ -872,6 +872,11 @@ and :term:`generators <generator>` which incur interpreter overhead.
seen.add(k)
yield element

def unique(iterable, key=None, reverse=False):
"Yield unique elements in sorted order. Supports unhashable inputs."
# unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4]
return unique_justseen(sorted(iterable, key=key, reverse=reverse), key=key)

def sliding_window(iterable, n):
"Collect data into overlapping fixed-length chunks or blocks."
# sliding_window('ABCDEFG', 4) → ABCD BCDE CDEF DEFG
Expand Down Expand Up @@ -1593,6 +1598,13 @@ The following recipes have a more mathematical flavor:
>>> ''.join(input_iterator)
'AAABBBCCDAABBB'

>>> list(unique([[1, 2], [3, 4], [1, 2]]))
[[1, 2], [3, 4]]
>>> list(unique('ABBcCAD', str.casefold))
['A', 'B', 'c', 'D']
>>> list(unique('ABBcCAD', str.casefold, reverse=True))
['D', 'c', 'B', 'A']

>>> d = dict(a=1, b=2, c=3)
>>> it = iter_except(d.popitem, KeyError)
>>> d['d'] = 4
Expand Down
6 changes: 1 addition & 5 deletions _sources/tutorial/classes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,7 @@ code will print the value ``16``, without leaving a trace::
del x.counter

The other kind of instance attribute reference is a *method*. A method is a
function that "belongs to" an object. (In Python, the term method is not unique
to class instances: other object types can have methods as well. For example,
list objects have methods called append, insert, remove, sort, and so on.
However, in the following discussion, we'll use the term method exclusively to
mean methods of class instance objects, unless explicitly stated otherwise.)
function that "belongs to" an object.

.. index:: pair: object; method

Expand Down
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/abstract.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/apiabiversion.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/arg.html
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/bool.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/buffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/bytearray.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/bytes.html
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/call.html
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/capsule.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/code.html
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/codec.html
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/complex.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/concrete.html
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/contextvars.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/conversion.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/coro.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/datetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/descriptor.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/dict.html
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/float.html
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/function.html
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/gcsupport.html
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/gen.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/hash.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/init.html
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/init_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
2 changes: 1 addition & 1 deletion c-api/iter.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ <h3>瀏覽</h3>
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最後更新於 Jun 01, 2024 (08:45 UTC)。
最後更新於 Jun 02, 2024 (14:44 UTC)。

<a href="/bugs.html">Found a bug</a>?

Expand Down
Loading

0 comments on commit 30f72ee

Please sign in to comment.