Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197542

Re: can you improve this text-only beginner copy program?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Ethan Carter <ec1828@somewhere.edu>
Newsgroups comp.lang.python
Subject Re: can you improve this text-only beginner copy program?
Date Wed, 27 Aug 2025 13:57:34 -0300
Organization A noiseless patient Spider
Lines 34
Message-ID <87ms7kbt35.fsf@somewhere.edu> (permalink)
References <87a53kdfpx.fsf@somewhere.edu> <copying-20250827160810@ram.dialup.fu-berlin.de>
MIME-Version 1.0
Content-Type text/plain
Injection-Date Wed, 27 Aug 2025 16:57:35 +0000 (UTC)
Injection-Info dont-email.me; posting-host="1ae1a19ff8f9677ec29754ac355e2a6e"; logging-data="858092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DLy5bb5WPTapt/X/RbXVO6H8i7+1r9ZM="
Cancel-Lock sha1:t+DIR/Xrcj4Vf7E0cCylUTo40LI= sha1:ItY0/noeEW4BFt7yMkro6g249qY=
Xref csiph.com comp.lang.python:197542

Show key headers only | View raw


ram@zedat.fu-berlin.de (Stefan Ram) writes:

> Ethan Carter <ec1828@somewhere.edu> wrote or quoted:
>>Can you think of anything I'm missing?
>
>   The correctness of a program as a solution to an assignment
>   depends on the exact wording of the assignment, so it's a
>   bit difficult to say without seeing it. 

You're right.  There's no written statement.  The exercise was suggested
by the teacher while in class.  It was something like ``write a program
that copies text files by getting source and destination via the
command-line.''

>>  """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.

But, yeah, if the Python community doesn't do that, it's all what you
say.

Thanks for your attention!  

PS.  Is it just me or there's just us in this used-to-be-very-active
group?  Thanks for being my teacher here.  Have a good day!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

can you improve this text-only beginner copy program? Ethan Carter <ec1828@somewhere.edu> - 2025-08-27 11:03 -0300
  Re: can you improve this text-only beginner copy program? ram@zedat.fu-berlin.de (Stefan Ram) - 2025-08-27 15:12 +0000
    Re: can you improve this text-only beginner copy program? Ethan Carter <ec1828@somewhere.edu> - 2025-08-27 13:57 -0300
      Re: can you improve this text-only beginner copy program? ram@zedat.fu-berlin.de (Stefan Ram) - 2025-08-27 17:45 +0000
      Re: can you improve this text-only beginner copy program? Piergiorgio Sartor <piergiorgio.sartor.this.should.not.be.used@nexgo.REMOVETHIS.de> - 2025-08-27 22:21 +0200
      Re: can you improve this text-only beginner copy program? Mark Bourne <nntp.mbourne@spamgourmet.com> - 2025-08-28 21:05 +0100
        Re: can you improve this text-only beginner copy program? (Posting On Python-List Prohibited) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-28 22:17 +0000
  Re: can you improve this text-only beginner copy program? ram@zedat.fu-berlin.de (Stefan Ram) - 2025-08-27 21:09 +0000
    Re: can you improve this text-only beginner copy program? Mark Bourne <nntp.mbourne@spamgourmet.com> - 2025-08-28 21:15 +0100
      Re: can you improve this text-only beginner copy program? ram@zedat.fu-berlin.de (Stefan Ram) - 2025-08-28 20:50 +0000
  Re: can you improve this text-only beginner copy program? (Posting On Python-List Prohibited) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-28 01:36 +0000

csiph-web