[Bf-python] Getting data that isnt there.
alex mole
nal at blueyonder.co.uk
Thu Apr 21 09:48:53 CEST 2005
Are you sure try/except is slower?
I have a feeling that exceptions are barely an overhead in python, so
unless you're doing it thousands of times, I'd doubt you'd notice the
difference.
Campbell Barton wrote:
> Hi, an Issue I have with a python script Im writing is getting data that
> might not be there.
>
> image = Image.Get(someImageName)# If the image name isnt there then an
> error is returned.
> Id prefer Image.Get(someImgName) to return None if the image dosent exist.
>
> Using try/except is an option for now but its a lot slower.
>
> Also Image depth,size etc returns an error when the image is missing
> (Pink mesh) - those should probably return None as well,
> - Cam
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 20/04/2005
More information about the Bf-python
mailing list