mirror of
https://github.com/Z3Prover/z3
synced 2025-11-25 23:19:32 +00:00
Add documentation and improve code comments
- Added comprehensive README for NuGet build workflow - Added detailed comments explaining the replace() function fix - Verified all Python syntax is correct Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
9419c9a897
commit
a864fbdf27
2 changed files with 96 additions and 0 deletions
|
|
@ -44,6 +44,15 @@ def classify_package(f, arch):
|
|||
return None
|
||||
|
||||
def replace(src, dst):
|
||||
"""
|
||||
Replace destination file with source file.
|
||||
|
||||
Removes the destination file if it exists, then moves the source file to the destination.
|
||||
This ensures that the file is always moved, whether or not the destination exists.
|
||||
|
||||
Previous buggy implementation only moved when removal failed, causing files to be
|
||||
deleted but not replaced when the destination already existed.
|
||||
"""
|
||||
try:
|
||||
os.remove(dst)
|
||||
except:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue