Changeset 13630


Ignore:
Timestamp:
05/10/12 08:44:28 (13 years ago)
Author:
neise
Message:
return_dict=True is now default
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/pyfact/pyfact.py

    r13518 r13630  
    8585                user_action_calib=lambda acal_data, data, blm, tom, gm, scells, nroi: None,
    8686                baseline_file_name='',
    87                 return_dict = None,
     87                return_dict = True,
    8888                do_calibration = True,
    8989                use_CalFactFits = True):
     
    101101        # manual implementation of default value, but I need to find out
    102102        # if the user of this class is aware of the new option
    103         if return_dict == None:
    104             print 'Warning: Rawdata.__init__() has a new option "return_dict"'
    105             print 'the default value of this option is False, so nothing changes for you at the moment.'
    106             print
    107             print 'you probably want, to get a dictionary out of the next() method anyway'
    108             print ' so please change your scripts and set this option to True, for the moment'
    109             print 'e.g. like this: run = RawData(data_filename, calib_filename, return_dict = True)'
    110             print "after a while, the default value, will turn to True .. so you don't have to give the option anymore"
    111             print 'and some time later, the option will not be supported anymore'
    112             return_dict = False
     103        if return_dict == False:
     104            print 'DEPRECATION WARNING:'
     105            print 'you are using RawData in a way, which is nor supported anymore.'
     106            print ' Please set: return_dict = True, in the __init__ call'
    113107        self.return_dict = return_dict
    114108        self.use_CalFactFits = use_CalFactFits
Note: See TracChangeset for help on using the changeset viewer.