Commit 51c326a
[#372] eliminate SyntaxWarning ("is" operator being used with a literal)
In the no-argument form of the call to function irods.message.ET (which the
client executes quite often), the comparison against a literal 0 was only
being used to test whether an call parameter was allowed to default; but the
first-ever such call (just after the production of the .pyc containing the
Python3 byte-code) was then emitting the disconcerting SyntaxWarning. Here, we
change the parameter's default value to an empty tuple and then use a ==
comparison instead to suppress the SyntaxWarning and, with that, better conform
to Python3's expectations in terms of restricted uses of the 'is' operator.1 parent 95b6f40 commit 51c326a
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
134 | | - | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
0 commit comments