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

Commit2ff7c91

Browse files
committed
doc: Fix example with __next__() in PL/Python function
Per PEP 3114, iterator.next() has been renamed to iterator.__next__(),and one example in the documentation still used next(). This caused theexample provided to fail the function creation since Python 2 is notsupported anymore since19252e8.Author: Erik WienholdDiscussion:https://postgr.es/m/173209043143.2092749.13692266486972491694@wrigleys.postgresql.orgBackpatch-through: 15
1 parent5de08f1 commit2ff7c91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎doc/src/sgml/plpython.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ $$ LANGUAGE plpython3u;
553553

554554
<varlistentry>
555555
<term>Iterator (any object providing <symbol>__iter__</symbol> and
556-
<symbol>next</symbol> methods)</term>
556+
<symbol>__next__</symbol> methods)</term>
557557
<listitem>
558558
<para>
559559
<programlisting>
@@ -569,7 +569,7 @@ AS $$
569569
def __iter__ (self):
570570
return self
571571

572-
defnext(self):
572+
def__next__(self):
573573
self.ndx += 1
574574
if self.ndx == len(self.who):
575575
raise StopIteration

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp