which doesn't give
you much more help.
Yes, I know from past conversations that you have a superhuman ability
to recognise the code in apparent line noise. That still doesn't make
it legible to anyone else.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman
I was complaining about.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
(~/Network/Test/topo.txt, r)', or the equivalent on
Windows).
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
flipping between them slows me down
dramatically. Long lines have no effect on the speed of the program, but
they can have serious effects on the speed of the programmer.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 30 Jul 2013 01:11:18 +0100, Joshua Landau jos...@landau.ws wrote:
On 30 July 2013 00:08, Rhodri James rho...@wildebst.demon.co.uk wrote:
I'm working on some shonky C code at the moment that inconsistent
indentation and very long lines. It is extremely annoying not to be
able to put
is it would be more foolproof to edit that stuff with a
spreadsheet.
There's nothing foolproof about using a spreadsheet!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
in ('y', 'yes', 'ohdeargodyes', 'you get the idea'):
print('ok')
else:
print('goodbye')
sys.exit()
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
?) of standard and hostile environments
as class variables.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
?
Sockets? It depends a bit on what you're trying to do, exactly. If you
give us a bit more context, we might be able to give you better advice.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
changes
to constants persisted. Many's the poor natural scientist who was
perplexed to find that 0 suddenly had the value 1!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
answered by the Qt Designer
manual? Which can be googled for trivially, by the way.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
! :)
Or, alternatively, that Python has many constants, such as all those
immutable integers cached around the place :-) What it doesn't have is
fixed bindings.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
working, it makes it so much easier for the rest of us to
understand what you meant when you use terms so loosely!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
)
that does nothing to bolster my confidence in your philosophising.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
or Usenet
newsgroup. Google groups seems to delight in making the previous post a
poorly defined concept (by gratuitously breaking reference chains and the
like). It's not that the skill isn't universal, it's that the opportunity
isn't.
--
Rhodri James *-* Wildebeest Herder to the Masses
)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
could call
it dead simple. ISO-8601-2004(E) is 40 pages long.
A short standard, then :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
.
Advanced? Huh. I have here a language that does exactly what I want
without all that messy syntax nonsense. I call it Research Assistant.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
, credits or license for more information.
print(1,2,3)
1 2 3
Python 2.7.1+ (r271:86832, Sep 27 2012, 21:12:17)
[GCC 4.5.2] on linux2
Type help, copyright, credits or license for more information.
print(1,2,3)
(1, 2, 3)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http
this.
The program makes perfectly good sense, it is your description that
I don't understand. Please tell us what it is supposed to do, and
what makes you think it doesn't do it.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
code and leave us to guess? Sorry but I'm not
bored enough to try.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
is not
moderated. God alone knows what Googlegroups thinks it's doing.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
already disallowed? It sounds to me like
you're complaining that Python is ahead of the curve here :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
(something Modula-2 and C didn't do nearly as well); and so on and
so forth. None of this is stuff your students need for their work, so I
wouldn't waste time side-tracking them with it.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python
On Mon, 09 Dec 2013 23:42:14 -, Roy Smith r...@panix.com wrote:
In article op.w7umbykna8ncjz@gnudebeest,
Rhodri James rho...@wildebst.demon.co.uk wrote:
Pascal and BCPL contrasted rigid typing with practically non-existent
typing
Wow, you actually used BCPL? I didn't realize
. Five years per language, ten
languages, that's 50 years I think. Or do I rewrite my diary for next
week, so I learn Smalltalk Monday morning, Ruby Monday afternoon, Julia
Tuesday morning ...
Welcome to Computer Science lectures :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
at it and
exclaimed, It's a hammer, all our problems must be nails! And the rest
is C++.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
explicit is better than implicit?
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
Pascal, but it's a painful process and it won't be pretty. It's far
better to use a language as it is rather than as you want it to be.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
another layer of *stuff* between you and the machine.
That's not to say it's the right language to be writing applications.
+1
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
to properly comprehend
what was going on and what the results would be for my sample data.
It looks like a good idea, but I don't think it works that well in
practice.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
relevant Perl around any
more. I think it had to do with losing the visual cue of indentation, and
just having to think that little bit harder to notice that I wasn't
dealing with purely linear code.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman
considerable margin.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 07 Jan 2014 01:35:54 -, Chris Angelico ros...@gmail.com
wrote:
On Tue, Jan 7, 2014 at 12:26 PM, Rhodri James rho...@wildebst.org.uk
wrote:
On Mon, 06 Jan 2014 21:17:06 -, Gene Heskett ghesk...@wdtv.com
wrote:
On Monday 06 January 2014 16:16:13 Terry Reedy did opine
to do this is probably using groupby:
from itertools import groupby
input = 3443331123377
output = .join(k for k, _ in groupby(s))
print output
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
(then, name):
_,mn,dy,_,_,_,wd,_,_ = localtime(then)
return somefunc(mn, dy, wd, name)
...
[meaningful_name(then, name) for (then, name) in mylist]
I assume there's some good reason you didn't want somefunc() to do the
localtime() itself?
--
Rhodri James *-* Wildebeest Herder
- (discount * price_per_book) after
applying the discount.
* refactoring, that's (1 - discount) * price_per_book. Ta da!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
) # False
five.contents[five.contents[:].index(5)] = 4
print(2 + 2 == 5) # True (must be sufficiently large values of 2
there...)
Heh. The author is apparently anonymous, I guess for good reason.
Someone's been writing FORTRAN again :-)
--
Rhodri James *-* Wildebeest Herder
://bugs.python.org/issue11604
It has to be said that the confusion is exacerbated by ignoring PEP-8
and using the same (CamelCase) name for the module and the class.
That does provide a rich source of errors in cases like this.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org
to everything regardless of how appropriate they are. I
certainly did!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
split strings, not lists. By
the looks of it that line is something left over from a previous attempt.
Just delete it, it's not doing anything useful for you.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 17 Apr 2011 17:17:02 +0100, wisecrac...@tesco.net wrote:
I`ll give you a clue... id(some_object) is close enough but NOT that
close.
You do realise that what id() returns is implementation-dependent, don't
you? In particular, what IronPython returns isn't an address.
--
Rhodri
to the next. Relying
on implementation-defined behaviour like this is a good way of getting
code to blow up in your face. You'll get much more reliable results by
starting in a language that was actually intended for direct memory
access, like C, and wrapping that in Python.
--
Rhodri James
'),
stdout=PIPE, stderr=PIPE)
The manual gives you an example of using shlex to split a string
into tokens if you'd rather do it that way.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
. $50 will supply enough articles
to keep a small company understandable for over a year. With your
generous help, we can beat this scourge!
Ahem.
Normal service will now be resumed.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
(http://wiki.python.org/moin/PythonInMusic)
has an entire section on MIDI packages. I've never used any of them,
so I can't comment.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
if the list you want to index into
isn't one of the lists you might want to look up, but that's just a detail.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
even if you do strip out all the debug information. By chance I'm having
to do something closely related to this at work just at the moment; it's
hard, but far from impossible.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
!
Now this is an analogy fallacy, and an obvious one at that.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
to them.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
time you call it:
for i in range(6):
print(i*i)
for day in (Mon, Tue, Wed, Thu, Fri):
do_stuff_for_day(day)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 25 Feb 2014 02:18:43 -, Dennis Lee Bieber
wlfr...@ix.netcom.com wrote:
On Mon, 24 Feb 2014 01:01:15 -, Rhodri James
rho...@wildebst.org.uk
declaimed the following:
The function range returns the sequence of numbers 1, 2, 3, 4 and 5
[*],
so this has the same effect
are not random number generators. They
are far too cussed for that :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
instruction, or
that splitting a loop into two to avoid a conditional test will let an
DSP's optimiser double the speed of a section of code.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
time (longer now that I'm not in practise),
but that's a separate matter.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
to double-
check that there's no 16-bit overflow causing something unexpected.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
to suggest since it
isn't one of the usual problems, but you might find reading
https://wiki.python.org/moin/GoogleGroupsPython helpful. It will
certainly help with the double-spacing in your quote above.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman
as the friend of mine I've finally persuaded
to stop writing Fortran in Python, I promise!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
Installation Guide page has instructions for editing the Apache
config files. No mention of running .\configure -- why are you doing
that? Try just editing the config files as the documentation suggests and
see if that works.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https
On Sun, 23 Mar 2014 02:46:28 -, Ian Kelly ian.g.ke...@gmail.com
wrote:
On Sat, Mar 22, 2014 at 6:32 PM, Rhodri James rho...@wildebst.org.uk
wrote:
On Sat, 22 Mar 2014 05:26:26 -, Rustom Mody rustompm...@gmail.com
wrote:
Well almost...
Except that the 'loop' I am talking of is one
nearly didn't bother putting in the effort to make it readable.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
65535 for example is a token. The more digits there are in
the number, the harder it is for me to take in in a way that doesn't
happen with letters. Even forty is better than 40 if you want me to
recall it!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org
of whom even know what a merkin is, and use the term anyway.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
was that the lines were too long (even ignoring the
trouble line-wrapping caused in your post) to take in with only a couple
of eye movements along the line. That makes a really quite surprising
difference to the comprehensibility of the whole thing.
--
Rhodri James *-* Wildebeest Herder
:
*plonk*
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
the need to specify an official language. One might wonder why...
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
* Image Timestamp
I suspect taking this apart may be a little involved.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
was the straw to break the camel's back this week, but it
is a complete pain to the rest of us. I have more than once considered
getting my reader to automatically discard anything with
@googlegroups.com in the message ID just to reduce the aggravation.
--
Rhodri James *-* Wildebeest Herder
On Fri, 11 Apr 2014 21:20:05 +0100, pete.bee@gmail.com wrote:
On Thursday, April 10, 2014 3:40:22 PM UTC-7, Rhodri James wrote:
It's called irony, and unfortunately Mark is reacting to an
all-to-common
situation that GoogleGroups foists on unsuspecting posters like
yourself.
People
, and stop using tabs.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
you say, It doesn't seem to work, what do you mean? What are you
expecting it to do? What does it actually do? Is there a traceback?
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
* use
Python for application writing because speed and space constraints are
usually quite tight, which generally means coding in C for preference
(despite my boss's attempts to force me to use C++).
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman
of higher resolution screens is that he can tile
more 80x40 console windows on them.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
commands -- rgrep, lgrep, grep-find etc
I generally find M-x grep sufficient.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
. Which you didn't either, I note.
The only downside to killfiles is that you have to pay attention or
you sometimes get bitten by this stuff.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
that as the end of
a text file. How you get out of that one, I'm not sure, but frankly
putting arbitrary binary into a literal string is rather asking for
something like this to come and bite you.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
library, like:
import string
return set(.join(L)) = set(string.printable)
I've no idea whether this is faster or slower than any of
your suggestions. You could timeit and see, or you could
wait a bit and not optimise prematurely.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http
?
It still really isn't clear what your *question* is here. Perhaps if
you showed us what you have tried already we might be better able to
divine what problem you're facing?
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
, some other software
or online service?
Usenet via my ISP, on comp.lang.python.
Using what client (or web client)?
Opera (as an NNTP client, not a web client).
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
comments that could be paraphrased as your broken editor
settings have made this (C code) unreadable.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
upvoted can be pretty hit-and-miss.
The other thing that may affect this is that anything posted to SE is
subject to the Creative Commons license. This may be an issue for
academic purposes, I don't know. (It's certainly an issue when you come
across J*ff!)
--
Rhodri James *-* Wildebeest
some, sure -- usually for Bollywood actress pictures --
but not enough to make me worry about Opera's relatively poor newsgroup
filtering facilities. If you're getting as much as you say, it's being
injected on the mail side of the gateway somehow.
--
Rhodri James *-* Wildebeest Herder
, columns, etc) has so far
been unequaled in anything else I have looked at.
I take it you haven't looked at TeX, then? :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
straightforward.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
, you'll need to write an IndentedHelpFormatter subclass that splits
the text on \n\n, textwraps the split string individually, then re-joins
them. _format_text() and format_option() look like the methods that would
need replacing.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http
translating a character as a smart quote or a non breaking space
or an e-umlaut or whatever, but that doesn't make the character legal!
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 14 Sep 2011 14:05:23 +0100, memilanuk memila...@gmail.com wrote:
Rick Xang Li are two examples of what you *don't* see (or at least I
don't) @ SO
Then you haven't been looking hard enough ;-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman
a
module.
Do you mean that one of the imported modules wishes to use an instance
created in the main script? If that's the case, you're going to have
to pass the instance to the module somehow, since the module knows
nothing of what if anything has imported it.
--
Rhodri James *-* Wildebeest
on that
doesn't grievously abuse at least one of the terms you are using. Could
you post some illustrative code snippets, please?
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
want more than one statement
executed per step was to wrap sequences of statements in a
SEQ construct. You end up indenting a long way very fast if
you aren't careful.
I'm afraid much as I love PAR, Python's dynamicism makes it
rather more 'exciting' than it was in occam.
--
Rhodri James
couple of decades of computer science.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
:
comparisons, then bitwise operators (*not* bitwise comparisons!), then
shifts, then arithmetic operators, the unary operators, the power
operator, and finally primaries.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
so many times in various guises
in the last week or two.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
are the worse culprits.
And while emacs is bad on the second, its excellent on the third -- to
the extend that you 'live inside emacs,' you dont need the mouse.
You clearly never trained as a classical pianist :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman
, but
print is a function in Python 3, so the parameter need parentheses
around them.
This would all involve a lot less guesswork if you cut and pasted both
your code and the error traceback.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python
(update_dict)
range(len(something)) is usually a warning sign (code smell, if you
prefer) that you aren't thinking in Python. If you really need the list
index for some nefarious purpose, enumerate(something) is probably still
a better bet.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org
which you weren't)
Since you probably want to do this for your file name too, you might
want to pass them as command line parameters to the script. Look up
sys.argv[] in the standard library, or the argparse module if you're
feeling keen.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
t are true in a boolean
context.
if attempt_umount() or df_output_lines():
is far more likely to do what you expect.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ive coding for blank lines or unexpected data
in there, and if want to use the results later on you probably want to
stash them in a dictionary, but that will do the job.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
401 - 500 of 855 matches
Mail list logo