3 ms·
Doesn't even touch on my personal pet peeve, people who don't use list and dict literals. I assume they're former Java programmers who got ahold of enough pyth
by mmagin 13y ago
Doesn't even touch on my personal pet peeve, people who don't use list and dict literals. I assume they're former Java programmers who got ahold of enough python knowledge to be dangerous. e.g:
x = dict()
x['a'] = 'string'
x['b'] = list()
x['b'].append('foo')
x['b'].append('bar')
- codygman 13y agoLiterals are much more readable in any language I've used (or at least can think of right now).
- prescindor 13y agoYou can say x = dict(a = 'string', b = list(('foo', 'bar')))