Is there a standard way of attributing / citing python code?
I am using another user's code verbatim and I would like to add a commented link for a code attribute for them.
Now I have:
#this code was taken from this page:
#https://www.<the website>.com
      
        
        
        
      
    
Is there a stylistic standard or common practice for code attribution in python?
+3 
Slicedbread 
source
to share
      
1 answer
      
        
        
        
      
    
If you accept the verbatim code verbatim, then that code is subject to copyright protection. If you have a license to use the code, follow the instructions in the license. If you do not have a license to use the code, stop using it.
Standard practice for attributing code is to enter the code that is required by the copyright owner.
EDIT: The license used is a Creative Commons license. If so, follow the Creative Commons Attribution Requirements and Guidelines: https://wiki.creativecommons.org/Best_practices_for_attribution
+1 
Robα΅© 
source
to share