Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings.warn is weird #2537

Closed
00001H opened this issue Jan 1, 2025 · 0 comments
Closed

warnings.warn is weird #2537

00001H opened this issue Jan 1, 2025 · 0 comments

Comments

@00001H
Copy link

00001H commented Jan 1, 2025

warnings.warn shows the message above the traceback, and NoneType is here for some reason (the default category should be UserWarning, even though the default argument is indeed None)

Brython 3.13.0 on Netscape 5.0 (Windows)
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.warn("hello")
<stdin>:1: NoneType: hello
  warnings.warn("hello")
>>> 

compare this with CPython:

Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug  6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import warnings
>>> warnings.warn("hello")
Warning (from warnings module):
  File "<pyshell#1>", line 1
UserWarning: hello
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant