I came across this question while thinking about the question whether the integrability is a local property. I first thought that the MSE question What's the definition of a "local property"? addresses this issue, but this question only answers what a local property for a topological space and not for a function is. Thus, my question is:
What is the definition for a property to be a local property of a function?
My attempt: Najib Idrissi gives in his answer to the question What's the definition of a "local property"? the answer
A property $P$ is local when, for all spaces $X$, if $\{U_i\}$ is an open cover of $X$ and all the $U_i$ have $P$, then $X$ has $P$.
From this one may deduce that
A property $P$ is local for a function $f:X\to Y$, iff from the fact, that $\{U_i\}$ is an open cover of $X$ and all $f|_{U_i}$ have the property $P$, follows that also $f$ has the property $P$.
Is this the right definition?
Update: First I had the following wrong argumentation in my question as pointed out by Daniel Fischer in the comments. However, the main question remains...
However, this does not seem to be the right definition. Let $X$ be the long line which we get by pasting $[0,1)$ uncountable many times together. We define $g:X\to\mathbb R$ with $g(x)=\sin(2\pi x)$ on each interval $[0,1)$. As J. Loreaux argued in his answer to the question Does this intuition for "calculus-ish" continuity generalize to topological continuity?, the function $g$ is not continuous.
This contradicts the above attempt for a definition of a function's local property since there is an (uncountable) open cover $\{U_i\}$ of the long line $X$ for which all $g|_{U_i}$ are continuous (for example when all $U_i$ are bounded) and continuity is one of the properties I would see as being a local property.
Also the Wikipedia article "Local property" does only answer what a local property for topological spaces is. It defines the term "being locally equivalent", but this is not what I am looking for.
So: What is the definition of a local property for a function?