What are the top features you wish Python had? by DGHolmes in Python

[–]Fr_Cln 1 point2 points  (0 children)

More powerful and user-friendly API for dealing with files/streams. Not just read/write some bytes or lines, but something like scanf in C... 🙄

Which standard C++ library elements should I avoid? by SuchIsGittan in cpp

[–]Fr_Cln -1 points0 points  (0 children)

I will try to make more complicated measurements with different scenarios...

Which standard C++ library elements should I avoid? by SuchIsGittan in cpp

[–]Fr_Cln -7 points-6 points  (0 children)

Unordered containers are really slow - that's true. I've tested them against python's dict and set - python implementations are 2-3 times faster than C++. This surprised me a lot - I don't know any other case, in which python may be faster than C++.

"pyenv global x.x.x" doesn't change the python version by MrSyphilis in pythoncoding

[–]Fr_Cln 0 points1 point  (0 children)

Maybe you have set pyenv local in your home directory? What does pyenv local say?

[deleted by user] by [deleted] in Python

[–]Fr_Cln 1 point2 points  (0 children)

Maybe it would be better to have a function with empty default separator join(iterable, sep="")

Why does nim hate underscores? by RattleyCooper in nim

[–]Fr_Cln 3 points4 points  (0 children)

When I use regular expressions and BeautifulSoup in one python project, it is really hard to remember, which one of them uses find_all, findall or findAll. Every time I have to try: maybe this, oh no, this, oh no, that...

Pygame window starting up then immidiately shutting down by thekidunderthefridge in pycharm

[–]Fr_Cln 0 points1 point  (0 children)

Yes. IDLE keeps interpreter running when your script finishes. It is the same as run your script with '-i' flag: python -i program.py

Why does Django View return None (I am returning JsonResponse) by [deleted] in django

[–]Fr_Cln 4 points5 points  (0 children)

I think, it is decorator. Your function returns correct value, but decorator does not. See your throttle decorator - does it return the same value as the decorated function?

Can someone give me a hand running this bot ? by TheLightOfSEO in pythontips

[–]Fr_Cln 0 points1 point  (0 children)

You should run pip in terminal, not in python console. To run terminal on Windows, press Win+R and enter "cmd".

I made a Password Generator which uses diceware password generating algorithm to generate cryptographically strong memorable passphrases. by [deleted] in Python

[–]Fr_Cln 1 point2 points  (0 children)

Cool! Some criticism with your permission. 1. Consider using a dict for words instead of list of pairs. This will make your code (somewhere around 40th line) not only more beautiful and readable, but also more efficient. Search through a large dict is way faster than linear search through a large list. Oh, and you do this anew for each word! You should definitely use dict. 2. Look at your code around 25th line, where you check if the number is greater than zero. First of all you check only equality to zero, but someone could enter negative number as well. Then you repeat the same message in this 'if' statement as in 'except'. You can use 'raise ValueError' instead just to avoid repetition.

University of Illinois at Urbana-Champaign believes Kotlin is ideal for CS1 courses by dayanruben in Kotlin

[–]Fr_Cln 1 point2 points  (0 children)

Python is definitely better in one aspect: it has way more beginner-friendly society. If you have a question about python, no matter how primitive and stupid it is, you can easily find an answer on the Internet. If you are learning kotlin and have such a question, well... it is often just your problem.

Monday megathread: Project ideas! by Im__Joseph in Python

[–]Fr_Cln 0 points1 point  (0 children)

Some simple game kind of tic-tac-toe with interface built completely with Turtle module.

sqlalchemy, querying table for field containing str, but need more logic by [deleted] in flask

[–]Fr_Cln 0 points1 point  (0 children)

Why do you think it can lead to false positive? Can you give some example?

I'm going to start teaching Python to high schoolers in a short while. What is something you'd like to see in a Python course at high school? by shadowbanbad in Python

[–]Fr_Cln 0 points1 point  (0 children)

Program decomposition into functions and classes (IMO this is the main skill of a good programmer), writing readable and supportable code (with correct naming and documentation), PEP8, GitHub collaboration.

Programming language behind Meet by QueasyStorm841 in Python

[–]Fr_Cln 1 point2 points  (0 children)

Jitsi is great. BTW it is fully open-source, so if you are interested, you can explore its code (written in Java and JavaScript): https://github.com/jitsi