On 07/02/2023 08:15, Chris Angelico wrote:
On Tue, 7 Feb 2023 at 18:49, Rob Cliffe via Python-list
wrote:
On 02/02/2023 09:31, mutt...@dastardlyhq.com wrote:
On Wed, 1 Feb 2023 18:28:04 +0100
"Peter J. Holzer" wrote:
--b2nljkb3mdefsdhx
Content-Type: text/plain; charset=us-ascii
Content-
On 2023-02-07 17:58:26 -0500, Ivan "Rambius" Ivanov wrote:
> I am trying to configure my loggers using dictConfig, but they do not
> print anything. Here are more details.
[...]
> from myloggingconf import configure_logging
>
> logger = logging.getLogger(os.path.basename(__file__))
[...]
>
> def
On Wed, 8 Feb 2023 at 10:18, Mark Bourne wrote:
>
> Stefan Ram wrote:
> > Mark Bourne writes:
> >> In the second case, eval() only gets the globals and immediate locals,
> >
> >Yes, I think you are right. Curiously, the following program would
> >mislead one to thing that eval /does/ see
Stefan Ram wrote:
Mark Bourne writes:
In the second case, eval() only gets the globals and immediate locals,
Yes, I think you are right. Curiously, the following program would
mislead one to thing that eval /does/ see the intermediate names:
main.py
def f():
x = 22
def g(
Hello,
I am trying to configure my loggers using dictConfig, but they do not
print anything. Here are more details.
I have several python scripts that use a similar logging setup. I put
the common configuration in a separate module myloggingconf.py:
# myloggingconf.py
import logging
def configu
On 2/7/23 14:53, Weatherby,Gerard wrote:
Yes.
Inspect module
import inspect
class Mine:
def __init__(self):
self.__value = 7
def __getvalue(self):
/"""Gets seven"""
/return self.__value
mine = Mine()
data = inspect.getdoc(mine)
for m in inspect.getmembers(mine):
if '__getvalue' in m[0]:
Yes.
Inspect module
import inspect
class Mine:
def __init__(self):
self.__value = 7
def __getvalue(self):
"""Gets seven"""
return self.__value
mine = Mine()
data = inspect.getdoc(mine)
for m in inspect.getmembers(mine):
if '__getvalue' in m[0]:
d
Stefan Ram wrote:
When one defines a function, sometimes its name is only
half-existent.
One can implicitly evaluate the name of the function:
main.py
def g():
def f():
print( f )
f()
g()
output
.f at ...
, but one gets an error when one tries to evaluate
I've been banging my head on Sphinx for a couple of days now, trying to
get it to include the docstrings of a private (name starts with two
underscores) inner class. All I've managed to do is convince myself
that it really can't do it.
See https://github.com/sphinx-doc/sphinx/issues/11181.
Is t
On Wed, 8 Feb 2023 at 05:30, Stefan Ram wrote:
>
> Rob Cliffe writes:
> >Does that mean that it is not possible to have a (built-in) function
> >that would construct and return a dictionary of all available variables
> >and their values? If it were possible, it could be useful, and there
> >woul
On Wed, 8 Feb 2023 at 02:12, Rob Cliffe wrote:
>
> [re-sending this to both the list and to Chris, as a prior send to the
> list only was bounced back]
> On 31/01/2023 22:33, Chris Angelico wrote:
> >
> >> Thanks for clarifying.
> >> Hm. So 'x' is neither in locals() nor in globals(). Which star
[re-sending this to both the list and to Chris, as a prior send to the
list only was bounced back]
On 31/01/2023 22:33, Chris Angelico wrote:
Thanks for clarifying.
Hm. So 'x' is neither in locals() nor in globals(). Which starts me
wondering (to go off on a tangent): Should there be a nonlo
On Tue, 7 Feb 2023 at 18:49, Rob Cliffe via Python-list
wrote:
>
>
>
> On 02/02/2023 09:31, mutt...@dastardlyhq.com wrote:
> > On Wed, 1 Feb 2023 18:28:04 +0100
> > "Peter J. Holzer" wrote:
> >> --b2nljkb3mdefsdhx
> >> Content-Type: text/plain; charset=us-ascii
> >> Content-Disposition: inline
>
13 matches
Mail list logo