Skip to content

Commit d3a33e7

Browse files
committed
Avoid unsafe default argument
1 parent 146be27 commit d3a33e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
package_dir = os.path.abspath(os.path.dirname(__file__))
3434

3535

36-
def embed(locals_=None, args=['-i', '-q'], banner=None):
36+
def embed(locals_=None, args=None, banner=None):
37+
if args is None:
38+
args = ['-i', '-q']
39+
3740
from .curtsies import main
3841
return main(args, locals_, banner)

0 commit comments

Comments
 (0)