Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #16336
| Path | csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Spiros Bousbouras <spibou@gmail.com> |
| Newsgroups | comp.programming |
| Subject | Re: Scanning |
| Date | Sun, 22 Jan 2023 16:44:44 -0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <2YwRboOtvOaNvrTA9@bongo-ra.co> (permalink) |
| References | <Scanning-20230119123241@ram.dialup.fu-berlin.de> <scanner-20230119154238@ram.dialup.fu-berlin.de> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Sun, 22 Jan 2023 16:44:44 -0000 (UTC) |
| Injection-Info | reader01.eternal-september.org; posting-host="bd25c2bbe355dec6cc9c6b1dbfa1933f"; logging-data="3350359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/VihzCUz/cam/3O1jg68VB" |
| Cancel-Lock | sha1:A93iONVmvNOWB4Si2PFpuTjIHzQ= |
| X-Server-Commands | nowebcancel |
| In-Reply-To | <scanner-20230119154238@ram.dialup.fu-berlin.de> |
| X-Organisation | Weyland-Yutani |
| Xref | csiph.com comp.programming:16336 |
Show key headers only | View raw
On 19 Jan 2023 14:48:29 GMT ram@zedat.fu-berlin.de (Stefan Ram) wrote: > ram@zedat.fu-berlin.de (Stefan Ram) writes: > >Let's take a very simple task: This scanner for text files > >has nothing more to do than to return every character, > >except to strip the spaces at the end of a line. > > Richard said that it matters what I need this for. > > I'd like to implement a tiny markup language similar > to languages like "Markdown" or "reStructuredText". > It should ignore spaces at the end of lines. > I'm going to implement it in Python. Does it need to have functionality where it produces output before it has seen all the input ? If not , then I would not just read a whole line but a whole file (or input) ! It seems extravagant but unless you have a realistic scenario where you worry that the whole input won't fit into memory , it is simplest to read the whole input into memory.
Back to comp.programming | Previous | Next | Find similar
Re: Scanning Spiros Bousbouras <spibou@gmail.com> - 2023-01-22 16:44 +0000
csiph-web