Changes between Initial Version and Version 1 of Ticket #16590, comment 2
- Timestamp:
- Aug 8, 2011, 10:23:51 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16590, comment 2
initial v1 1 How about empty string by default and optional __init__ parameter? Not perfect solution, but will make !ContentFile substitutable for Filein more places (http://en.wikipedia.org/wiki/Liskov_substitution_principle)1 How about empty string by default and optional ```__init__``` parameter? Not perfect solution, but will make ```ContentFile``` substitutable for ```File``` in more places (http://en.wikipedia.org/wiki/Liskov_substitution_principle) 2 2 3 I use !ContentFilea lot in tests, where I don't want to touch file system if not needed. Having to check ```hasattr(file, 'name')``` is a bit frustrating.3 I use ```ContentFile``` a lot in tests, where I don't want to touch file system if not needed. Having to check ```hasattr(file, 'name')``` is a bit frustrating.