Good point. I suppose the only cross-version solution would be: # Script MUST run under various Python versions without change ... print int(container/widget) ,'widgets will fit in the container' It's a tiny bit verbose, but at least it's very explicit.