Re: What is the difference between instance.title = attrs.get('title', instance.title) vs instance.title = attrs['title'] ?

2013-03-14 Thread lamen
>> try: >> max_retries = config['max_retries'] >> except KeyError: >> max_retries = 10 >> >> versus >> >> max_retries = config.get('max_retries', 10) >> >> >> >> Cheers, >> AT >> >> >&g

What is the difference between instance.title = attrs.get('title', instance.title) vs instance.title = attrs['title'] ?

2013-03-14 Thread lamen
Hello, Not sure what the difference is in the usage of attrs I could not find the documentation for this although I'm sure it's going to be obvious after the fact. Also, could someone tell me what the double asterisks mean in the line return Comment(**attrs) ? Is this some type of variable len