I was reading this interpretation of conditional expectation to try understand better conditional expectation and measurability. What I understood from it is that given a probability space $\Omega$ and $\{A_i\}_{i\in I}$ a partition of $\Omega$, if we have a $\sigma$-algebra $\mathcal{F}=\sigma(\{A_i\}_{i\in I})$, i.e. a $\sigma$-algebra which is generated by a partition of $\Omega$ then $E(X|\mathcal{F})(\omega)=E[X|A_j]$ if $\omega\in A_j$. However, the last step (6.) from the first linked post where the method is extended to any $\sigma$-algebra is not clear to me. Indeed there are some $\sigma$-algebras that are not generated by a partitions, like the Borel sigma-algebra on $[0,1]$ (see this post) and then it is not so clear to me how this technique works.
Added
Maybe there is something I am not getting right about how step (6.) from the linked answer should work. I consider $([0,1],\mathcal{B},P)$ where $\mathcal{B}$ are the borel sets and $P$ the Lebesgue measure on $[0,1]$. A partition of $[0,1]$ with borel sets (which doesn't generate the borelians since by the linked answer this is not possible) would be $[0,1]= \sqcup_{\omega\in[0,1]}\{\omega\}$. However we know that $\omega\in \{\omega\}$ and by analogy with the linked answer we would like to have $E[X|\mathcal{B}]=E[X|\{\omega\}]= E[X:{\omega}]/P(\{\omega\})$ but $P(\{x\})=0$ so this is not well defined. In general $\omega\in (\omega-\epsilon,\omega+\epsilon)$ then we also have $\omega\in (\omega-\epsilon/2,\omega+\epsilon/2)$ or $\omega\in (\omega-\epsilon/3,\omega+\epsilon/3)$ or whatever. But how do you define $E[X|\mathcal{B}]$? Indeed, $W[X|(\omega-\epsilon,\omega+\epsilon)]$, $W[X|(\omega-\epsilon/2,\omega+\epsilon/2)]$ or $W[X|(\omega-\epsilon/3,\omega+\epsilon/3)]$ are different. I just don't understand how point 6) works in this case.
There is a geometric way to look at this. Consider a probability space $(\Omega,\mathscr{F},P)$ and $L_2(P)$ the space of real valued $\mathscr{F}$-measurable functions $X$ such that $E[|X|^2]<\infty$. If you have develop enough integration theory, it turns our that $L_2(P)$ (once functions $X$, $Y$ with $P(X\neq Y)=0$ are identified) is a nice Hilbert space, that is a complete inner product where $$\langle X,Y\rangle=E[XY]=\int_\Omega X(\omega)Y(\omega)\,P(d\omega)$$
In the examples where you have a measurable finite partition of $\Omega$, say $\mathcal{A}=\{A_1,\ldots,A_n\}\subset\mathscr{F}$, $A_j\cap A_k=\emptyset$ if $j\neq k$, $P[A_j]>0$ for all $j$, and $\Omega=\bigcup^n_{j=1}A_k$, the functions $Y_j=\mathbb{1}_{A_j}$ are orthogonal: $E[Y_jY_k]=P[A_j\cap A_k]=0$ if $j\neq k$. The expected value of a given random variable $X$ given $\mathcal{A}$ is $$ E[X|\mathcal{A}]=\sum^n_{j=1}\frac{E[A\mathcal{1}_{A_j}]}{P{A_j}}\mathbb{1}_{A_j}=\sum^n_{j=1}\frac{E[XY_j]}{E[Y_j^2]}Y_j$$ which is the same is the orthogonal projection of $X$ on the the linear space spanned by $\{Y_1,\ldots, Y_k\}$. Notice that $E\big[Y_j(X-E[X|\mathcal{A}]\big]=0$ for all $1\leq j\leq n$.
This can be generalized to any other $\sigma$-algebra $\mathscr{G}\subset\mathscr{F}$, for the orthogonal projection of a function $L_2(P)$ onto the closure (in the $L_2(P)$-norm) of the linear space generated by the functions in $L_2(P)$ that are $\mathscr{G}$-measurable always exists.
Thus, if $X\in L_2(P)$, $E[X|\mathscr{G}]$ is the orthogonal projection of $X$ onto the closure (in $L_2(P)$ if the linear space generated by $L_2(P)$ functions that are $\mathscr{G}$-measurable.
For functions $X\in L_1(P)$, there is a more sophisticated way to defined $E[X|\mathscr{G}]$, for any $\sigma$-algebra $\mathscr{G}\subset\mathscr{F}$ through a result known as the Radon-Nikodym theorem. The Radon-Nikodym theorem in turn can be proved using $L_2(P)$ methods (for example Rudin, W. Real Complex Analysis, 3rd edition, McGraw-Hill, pp. 121-122).