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

Appearance settings

Commit f357e4c

Browse filesBrowse files
committed
Make MAGIC_METHODS immutable
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent b44d185 commit f357e4c
Copy full SHA for f357e4c

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpython/autocomplete.py‎

Copy file name to clipboardExpand all lines: bpython/autocomplete.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141

4242
ALL_MODES = (SIMPLE, SUBSTRING, FUZZY)
4343

44-
MAGIC_METHODS = ["__%s__" % s for s in [
44+
MAGIC_METHODS = ("__%s__" % s for s in (
4545
"init", "repr", "str", "lt", "le", "eq", "ne", "gt", "ge", "cmp", "hash",
4646
"nonzero", "unicode", "getattr", "setattr", "get", "set", "call", "len",
4747
"getitem", "setitem", "iter", "reversed", "contains", "add", "sub", "mul",
4848
"floordiv", "mod", "divmod", "pow", "lshift", "rshift", "and", "xor", "or",
4949
"div", "truediv", "neg", "pos", "abs", "invert", "complex", "int", "float",
50-
"oct", "hex", "index", "coerce", "enter", "exit"]]
50+
"oct", "hex", "index", "coerce", "enter", "exit"))
5151

5252

5353
def after_last_dot(name):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.