From: | Erik Wienhold <ewie(at)ewie(dot)name> |
---|---|
To: | el481(at)yandex(dot)ru, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Misprints in code |
Date: | 2024-11-21 15:31:07 |
Message-ID: | fe60c0fa-cea7-4c6e-b951-28f566289550@ewie.name |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On 2024-11-20 09:13 +0100, PG Doc comments form wrote:
> https://www.postgresql.org/docs/16/plpython-data.html#PLPYTHON-DATA-SET-RETURNING-FUNCS
> The code contains a misprint in the following section: Iterator (any
> object providing __iter__ and next methods)
>
> def next (self): must be: def __next__ (self):
>
> Also, the header - Iterator (any object providing __iter__ and next methods)
> should be Iterator (any object providing __iter__ and __next__ methods)
Good catch! That's a leftover from Python 2 and missed in commit
4228cabb72b after Python 2 was dropped in 15.0. Patch attached.
While looking at, we can also simplify a couple of plpython3u test
functions that still try res.next() before res.__next__(). Attached as
a separate patch.
--
Erik
Attachment | Content-Type | Size |
---|---|---|
fix-plpython-docs.patch | text/x-diff | 660 bytes |
simplify-plpython-tests.patch | text/x-diff | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2024-11-21 22:15:02 | Re: Logical replication - initial data synchronization |
Previous Message | Michael Paquier | 2024-11-21 01:12:30 | Re: wal_compression = on: what is the algorithm? |