  We introduce an extension of the P\'olya tree approach for constructing
distributions on the space of probability measures. By using optional stopping
and optional choice of splitting variables, the construction gives rise to
random measures that are absolutely continuous with piecewise smooth densities
on partitions that can adapt to fit the data. The resulting "optional P\'{o}lya
tree" distribution has large support in total variation topology and yields
posterior distributions that are also optional P\'{o}lya trees with computable
parameter values.
