I am working on a simple script that uses parse_args, but the assignment does not work if the variable name is args, as shown in the documentation and multiple examples.
(Pdb) parser.parse_args()
Namespace(partition_frequency='daily', start_date='2016-02-03', table_name='test_table')
(Pdb) x=parser.parse_args()
(Pdb) x
Namespace(partition_frequency='daily', start_date='2016-02-03', table_name='test_table')
(Pdb) args=parser.parse_args()
(Pdb) args
**>> No output**
(Pdb) arg=parser.parse_args()
(Pdb) arg
Namespace(partition_frequency='daily', start_date='2016-02-03', table_name='test_table')
Any clues?
The problem is that you are running these commands in pdb.
As it turns out, args is a pdb command! So it's not being interpreted as a variable, but rather as a command to pdb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With