Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

cpython

Why does id({}) == id({}) and id([]) == id([]) in CPython?

August 21, 2022 by Magenaut

Why does CPython (no clue about other Python implementations) have the following behavior?

Categories Python, Q&A Tags cpython, identity, python, python-internals Leave a comment

Why does Python code run faster in a function?

August 21, 2022 by Magenaut

Some opcodes tend to come in pairs thus making it possible to
predict the second code when the first is run. For example,
GET_ITER is often followed by FOR_ITER. And FOR_ITER is often
followed by STORE_FAST
or UNPACK_SEQUENCE.

Categories Python, Q&A Tags benchmarking, cpython, performance, profiling, python Leave a comment

How is set() implemented?

August 20, 2022 by Magenaut

I’ve seen people say that set objects in python have O(1) membership-checking. How are they implemented internally to allow this? What sort of data structure does it use? What other implications does that implementation have?

Categories Python, Q&A Tags cpython, data-structures, python, set Leave a comment

Python vs Cpython

August 19, 2022 by Magenaut

What’s all this fuss about Python and CPython (Jython,IronPython), I don’t get it:

Categories Python, Q&A Tags cpython, python Leave a comment

Why (0-6) is -6 = False?

August 18, 2022 by Magenaut

Possible Duplicate:
Python “is” operator behaves unexpectedly with integers

Categories Python, Q&A Tags cpython, debugging, integer, python Leave a comment

Print to standard printer from Python?

August 18, 2022 by Magenaut

Is there a reasonably standard and cross platform way to print text (or even PS/PDF) to the system defined printer?

Categories Python, Q&A Tags cpython, printing, python Leave a comment

Why do -1 and -2 both hash to -2 in CPython?

August 18, 2022 by Magenaut

Possible Duplicate:
When is a python object’s hash computed and why is the hash of -1 different?

Categories Python, Q&A Tags cpython, hash, python Leave a comment

Python string ‘in’ operator implementation algorithm and time complexity

August 17, 2022 by Magenaut

I am thinking of how the in operator implement, for instance

Categories Python, Q&A Tags algorithm, cpython, python, string Leave a comment

list() uses slightly more memory than list comprehension

August 17, 2022 by Magenaut

So i was playing with list objects and found little strange thing that if list is created with list() it uses more memory, than list comprehension? I’m using Python 3.5.2

Categories Python, Q&A Tags cpython, list, list-comprehension, python, python-internals Leave a comment

How to load a C# dll in python?

August 16, 2022 by Magenaut

how can I load a c# dll in python?

Categories Python, Q&A Tags .net, c#, cpython, python, python.net Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress