Changeset 8227 for main/waeup.kofa/trunk
- Timestamp:
- 20 Apr 2012, 06:03:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.txt
r8224 r8227 496 496 This time we get even an exception! 497 497 498 Generally, empty strings are considered as ``None``: 499 500 >>> open('newcomers.csv', 'wb').write( 501 ... """name,dinoports,owner 502 ... "Wilmas Asylum","","Wilma" 503 ... """) 504 505 >>> result = processor.doImport('newcomers.csv', ['name', 506 ... 'dinoports', 'owner'], 507 ... mode='update', user='Bob') 508 >>> result 509 (1, 0, '...', None) 510 511 >>> wilma.dinoports 512 2 513 514 Clean up: 515 516 >>> shutil.rmtree(os.path.dirname(result[2])) 517 498 518 We can tell to set dinoports to ``None`` although this is not a 499 519 number, as we declared the field not required in the interface: … … 501 521 >>> open('newcomers.csv', 'wb').write( 502 522 ... """name,dinoports,owner 503 ... "Wilmas Asylum", ,"Wilma"523 ... "Wilmas Asylum","XXX","Wilma" 504 524 ... """) 505 525 … … 516 536 517 537 >>> shutil.rmtree(os.path.dirname(result[2])) 518 519 Generally, empty strings are considered as ``None``:520 521 >>> open('newcomers.csv', 'wb').write(522 ... """name,dinoports,owner523 ... "Wilmas Asylum","","Wilma"524 ... """)525 526 >>> result = processor.doImport('newcomers.csv', ['name',527 ... 'dinoports', 'owner'],528 ... mode='update', user='Bob')529 >>> result530 (1, 0, '...', None)531 532 >>> wilma.dinoports is None533 True534 535 Clean up:536 537 >>> shutil.rmtree(os.path.dirname(result[2]))538 539 538 540 539 Removing entries
Note: See TracChangeset for help on using the changeset viewer.