Changes between Initial Version and Version 1 of Ticket #16590, comment 2


Ignore:
Timestamp:
08/08/2011 10:23:51 AM (4 years ago)
Author:
oinopion
Comment:

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 File in more places (http://en.wikipedia.org/wiki/Liskov_substitution_principle)
     1How 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)
    22
    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.
     3I 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.
Back to Top