Let $X$ be a Cantor set. Then it is know that for any open subset $U$ of $X$, we can write $U$ as an increasing union of clopen subsets (in $X$). The same holds for any compact, metric, zero-dimensional space.
What does one need to assume on $X$ to have this property?
Is it still true if one assumes that $X$ is a zero-dimensional, metric space? (not necessarily compact)?
Thanks for any answer
To answer the second one: it certainly holds in a hereditarily Lindelöf zero-dimensional space. This is because open sets are then Lindelöf and thus countable unions of clopen sets, which can be made into an increasing union of clopens taking finite unions of initial segments. So for metric spaces this is the same as being separable, second countable etc. by well-known facts.
Being hereditarily Lindelöf is not necessary in general: any discrete space obeys the condition and only countable ones are hereditarily Lindelöf. It is necessary to be perfect (in the sense that closed sets are $G_\delta$'s or equivalently that open sets are $F_\sigma$'s). If locally compact, this reduces to being herediarily Lindelöf again.
I'm not sure (but I don't think so) that all zero-dimensional metric spaces will have the property, e.g. $D(\kappa)^\omega$, where $(D(\kappa)$ is a discrete space of uncountable size $\kappa$, seems a natural counterexample.