I would like to perform the following:

a=max(a,3)
b=min(b,3)

However sometimes a and b may be None.
I was happy to discover that in the case of max it works out nicely, giving my required result 3, however if b is None, b remains None...

Anyone can think of an elegant little trick to make min return the number in case one of the arguments in None?

Edit
Report