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

Commit667c9a2

Browse files
committed
correcting deletions
1 parent02b645d commit667c9a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎Lib/csv.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,12 @@ def __next__(self):
130130
returnd
131131

132132
__class_getitem__=classmethod(types.GenericAlias)
133+
133134
classDictWriter:
134135
def__init__(self,f,fieldnames,restval="",extrasaction="raise",
135136
dialect="excel",*args,**kwds):
137+
iffieldnamesisnotNoneanditer(fieldnames)isfieldnames:
138+
fieldnames=list(fieldnames)
136139
self.fieldnames=fieldnames# list of keys for the dict
137140
self.restval=restval# for writing short dicts
138141
ifextrasaction.lower()notin ("raise","ignore"):
@@ -158,6 +161,8 @@ def writerow(self, rowdict):
158161

159162
defwriterows(self,rowdicts):
160163
returnself.writer.writerows(map(self._dict_to_list,rowdicts))
164+
165+
__class_getitem__=classmethod(types.GenericAlias)
161166

162167
# Guard Sniffer's type checking against builds that exclude complex()
163168
try:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp