Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Piergiorgio Sartor Newsgroups: comp.lang.python Subject: Re: can you improve this text-only beginner copy program? Date: Wed, 27 Aug 2025 22:21:08 +0200 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: <87a53kdfpx.fsf@somewhere.edu> <87ms7kbt35.fsf@somewhere.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 27 Aug 2025 20:25:31 +0000 (UTC) Injection-Info: dont-email.me; posting-host="6f2a5403a40fdcbe184cee247dac92a9"; logging-data="969275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Lqs/eAgs/KToZxk/FnzVg" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Ga7pWeI00UxYAdoREIsKJpFhy0A= In-Reply-To: <87ms7kbt35.fsf@somewhere.edu> Content-Language: it, en-GB Xref: csiph.com comp.lang.python:197544 On 27/08/2025 18.57, Ethan Carter wrote: [...] >>> """Copies text file named S to text file named D.""" >> >> This is not entirely clear, since case is significant in Python >> ("S" is not the same as "s"), and it is ambiguous whether it refers >> to a file actually named "S" or to a file whose name is provided as >> a str object bound to the name "s" in the function's source code. > > This is how docstrings are traditionally written in GNU EMACS ELISP > code---they upcase argument names of the procedure being documented. I > can't recall who taught me this, but I believe it was Robert Chassel in > his book ``An Introduction to Emacs Lisp'' that's included in the GNU > EMACS itself. That's because LISP has a difficult relationship with case (sensitive / insensitive). In any environment strictly case sensitive, it's obviously not a good idea to change case at will. So, don't use LISP docstrings style in Python... bye, -- piergiorgio