python-cookbook
python-cookbook copied to clipboard
Code samples from the "Python Cookbook, 3rd Edition", published by O'Reilly & Associates, May, 2013.
If the ignore_types is tuple instead of default (str, bytes), need add ignore_types argument when calling flatten() recursively.
Hello, I have set up the urlimport.py script as described, but from the jupyternotebook a method or attribute from urlimport.py is not being recognized as such
python-cookbook/src/8/extending_classes_with_mixins/example2.py that's seem not a solutino for minin class which needs init method, i have checked on python 2.7, this is what i got: C:\Python27\python.exe D:/dev/python/pyqt/workapce/pyqt/widget/test/test.py File "D:/dev/python/pyqt/workapce/pyqt/widget/test/test.py", line 2...
hi, David i have just tested python-cookbook/src/8/lazily_computed_attributes/example1.py but happened to findout it does not workout like what the book tell, which i meam python cookbook, 3rd. After a little research,...
i finally got this working by defining 'record' instead of user_record. Just wanted to share .. thanks! on-input-37-fd835976edf3> in () ----> 1 user_record = name, email, *phone_numbers NameError: name 'email'...
In example of section 1.2 the first variable with name record must be replaced by user_record ` > user_record = ('Dave', '[email protected]', '773-555-1212', '847-555-1212') > name, email, *phone_numbers = user_record...
Instead of zipping the values and keys of a dictionary to sort or find the min/max, why not use the 'key' kwarg of those functions along with dict.items()?
The demo of the `indices` method is called on a different object `a` than the previously instanciated one. This could be fixed ny instanciating `a` with the following line: ```...