Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Methods to modify python immutable python objects inplace using ctypes. Experimental. Warning - Do not use these in your code unless you are very, very sure what you are doing and have very good reasons.

License

NotificationsYou must be signed in to change notification settings

arrmansa/modify-tuples-strings-inplace-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Methods to modify python immutable python objects inplace using ctypes.
Experimental.]Warning - Do not use these in your code unless you are very, very sure what you are doing and have very good reasons.

Main problems

Multiple completely unrelated variables in a program might reference the same tuple / string / float etc. if they are the same value.
Changing something inplace may cause unexpected variable value changes, which can break code, cause segfaults, etc.

Stackoverflow Links

Answer by Michael Lipp
Question by Abdul Niyas P M

Output

python final_functions.py
(1, 2, 3) 140044418733632(1, 'hello', 3) 140044418733632 (1, 'hello', 3) (1, 2, 3)very cool python code 140044418733632very cool ctype stuff 140044418733632 very cool ctype stuff a very cool python code0.1 0.1 0.6 1.6

About

Methods to modify python immutable python objects inplace using ctypes. Experimental. Warning - Do not use these in your code unless you are very, very sure what you are doing and have very good reasons.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp