of malformed input and edge
cases.
I use html5lib - it's fast enough for what I do, and the most likely to
return results matching what the author saw when they maybe tried it in a
single web browser.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
ng being repeated.
>
10 digits is only 9. That's not a very big number. Forget
nanoseconds since the epoch, that won't currently give you seconds since
the epoch - let alone combining with any other identifier.
$ date '+%s'
1575942612
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
ot;, line 1, in
TypeError: __class__ assignment only supported for heap types or ModuleType
subclasses
In some implementations it is possible to subvert the Python typing system
by stepping out of Python code and into (for example) a C extension, but
that does not make Python *the language* weakly typed.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 29 January 2018 at 11:27, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Mon, 29 Jan 2018 08:55:54 +1100, Tim Delaney wrote:
>
> > I got back a Word document containing about 10 screenshots where they'd
> > apparently taken a screenshot, moved the
g.
BTW: I have nothing to do with the final persistence format of the data,
but in practice I've had to learn the DB schema and stored procedures for
everything I support. Strangely the DB team don't have to learn my parts ...
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
r example, I and most Australians would say that writing "an
herb" is a mistake since we pronounce the "h", but millions of people
elsewhere would disagree with us.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
use it. A more accurate test of the way both functions would
normally be used would be to iterate over the results instead of eagerly
building a list. In this test you would also expect scandir() to use less
memory for a large directory.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
aving to think up another name for a very temporary structure
(names are hard). And I would include a comment explaining the reuse of the
name.
The alternative would be something like (replace first line by something
complex ...):
near_limit_list = [1]
near_limit = len(near_limit_list)
del near_lim
if your method of choosing the random sample was to pick a book
off a library shelf).
But unless otherwise qualified, a claim of being able to compress random
data is taken to mean any and all sets of random data.
Anyway, that's going to be my only contribution to this thread.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 18 April 2016 at 09:30, Chris Angelico <ros...@gmail.com> wrote:
> On Mon, Apr 18, 2016 at 8:02 AM, Tim Delaney
> <timothy.c.dela...@gmail.com> wrote:
> > I also wouldn't describe Java as a
> > "perfectly good language" - it is at best a compromise langu
.
Python is *much* closer to my idea of a perfectly good language.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
ws which is
> limited to 80 characters unless you do some hijinks in the settings
> to expand it.
>
Personally, I've given up on 80 characters (or even 120 in rare cases) for
Java code (esp method declarations), where just specifying the generics can
often take almost that much.
But for Python code i
m a file I think read a chunk, and seek() back to
the delimiter is probably going to be most efficient whilst leaving the
file position just after the delimiter.
If reading from a stream, I think Chris' read a chunk and maintain an
internal buffer, and don't give access to the underlying stream.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
per line (on Python 3.x), since that is
what the reversed() iterator will return. You will need to do something
else to get it back to a single string.
Have you read through the python tutorials?
https://docs.python.org/3/tutorial/
or for Python 2.x:
https://docs.python.org/2/tutorial/
Tim
On 1 June 2015 at 10:30, Mark Lawrence breamore...@yahoo.co.uk wrote:
On 01/06/2015 00:23, Tim Delaney wrote:
The for statement must have a colon at the end of line e.g. a complete
for statement and block is:
for br in b:
print br
This will output the characters one per line
@ in the future, but please do not CC the list.
My spam filters have learned to filter out most job spam automatically by
now, but it doesn't filter out your reply.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
multiple multi-lingual people talking
together where at least two of their languages match (or are close enough
for most uses e.g. Spanish and Portuguese). They'll slip in and out of
multiple languages depending on which best expresses what they're trying to
say, and no one will involved realise.
Tim
On 5 March 2015 at 09:39, Emile van Sebille em...@fenx.com wrote:
On 3/4/2015 12:40 PM, Tim Delaney wrote:
A related thing is when you have multiple multi-lingual people talking
together where at least two of their languages match (or are close
enough for most uses e.g. Spanish
. But the disadvantage of the former is that if you
*don't* want to rename, it violates DRY (don't repeat yourself).
The difference is so marginal that I'd leave it to personal preference, and
wouldn't pull someone up for either in a code review.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python
a multitude of uses for
user interfaces, whilst other quadrilaterals are somewhat less useful.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
not put proxy objects into the list/dict? Have a look at the weakref
module for an API that may be suitable for such proxy objects (if you used
the same API, that would also allow you to transparently use weakrefs in
your lists/dicts).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python
their abominations ;)
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
to merge/graft as
appropriate.
Branches and clones are two different ways of organising, and I find that
things work best for me when I use both.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
relink default
relinking d:\home\repos\feature_branch_repo\.hg/store to
d:\home\repos\default_repo\.hg/store
tip has 22680 files, estimated total number of files: 34020
collected 229184 candidate storage files
pruned down to 49838 probably relinkable files
relinked 359 files (221 MB reclaimed)
Tim
a bit messy, and could cause problems if you later do a merge
that includes the originally-grafted changeset on top of the amended
changeset (since the changes committed to the amended changeset will be
considered during the merge).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
of versions.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
a need for an IDE for Python - I'm quite happy using
EditPlus (which I preferred enough to other alternatives on Windows to pay
for many years ago).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 20 July 2014 09:19, Chris Angelico ros...@gmail.com wrote:
On Sun, Jul 20, 2014 at 7:50 AM, Tim Delaney
timothy.c.dela...@gmail.com wrote:
IMO there is no project so modest that it doesn't require version
control.
Especially since version control is as simple as:
cd project
hg
advise anyone who works cross-platform to install MSYS on their Windows
boxes (for the simplest, most consistent behaviour ignore rxvt and just
launch bash -l - i directly). Or use cygwin if you prefer.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
Congratulations.
I can't find the details of PyPy3's unicode implementation documented
anywhere. Is it equivalent to:
- a Python 3.2 narrow build
- a Python 3.2 wide build
- PEP 393
- something else?
Cheers,
Tim Delaney
On 21 June 2014 06:32, Philip Jenvey pjen...@underboss.org wrote
/newsgroup is to troll about the FSR. Please don't
reply to him (and preferably add him to your killfile).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
*standing* on the keyboard, between you and the monitor, and
rubbing his head against your hands, is a whole other matter.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 2 June 2014 17:45, Wolfgang Maier
wolfgang.ma...@biologie.uni-freiburg.de wrote:
Tim Delaney timothy.c.delaney at gmail.com writes:
For some purposes, there needs to be a way to treat an arbitrary stream
of
bytes as an arbitrary stream of 8-bit characters. iso-latin-1 is a
convenient
(effectively treating everything as bytes), with the option for
another encoding if/when more information is known (e.g. there's often a
call to return the encoding, and the output of that call is guaranteed to
be ASCII).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 2 June 2014 11:14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info
wrote:
On Mon, 02 Jun 2014 08:54:33 +1000, Tim Delaney wrote:
I'm currently working on a product that interacts with lots of other
products. These other products can be using any encoding - but most of
the functions
- no need
to reinvent the wheel.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
the other end a senior developer/technical lead and
effective communicator.
And that's how I learned to program.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
-posted email thread with people using bizarre fonts
and colours throughout.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 13 February 2014 08:02, Tim Delaney timothy.c.dela...@gmail.com wrote:
I received a copy of The Beginners Computer Handbook: Understanding
programming the micro (Judy Tatchell and Bill Bennet, edited by Lisa Watts
- ISBN 0860206947)
I should have noted that the examples were all BASIC
attribute. Functions as objects and iterators
being so pervasive means that visitor and related patterns are just a
normal style of programming, instead of having to be explicit.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
that instance variables will have their default
values (null for objects). When the base class constructor is eventually
run the instance variables will be assigned the values in the class
definition (replacing anything set by the subclass method call).
Tim Delaney
--
https://mail.python.org/mailman
is a bug in
either the documentation or the implementation.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
.
The only way to truly protect code is to not ship any version of it
(compiled or otherwise), but have the important parts hosted remotely under
your control (and do your best to ensure it doesn't become compromised).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
. Reduced memory use in most cases.
It is impossible for UTF-8 to meet both criteria 1b and 2 without
additional auxiliary data (which uses more memory and increases complexity
of the implementation). The FSR meets all 3 criteria.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
last leg sochi without the quotes).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
of the Kremlin are just like that coming out of the
Reichstag in the thirties.
You are of course correct - I was still groggy from waking up when I
replied, and focused on the element that I had been most exposed to.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 12 December 2013 03:25, Chris Angelico ros...@gmail.com wrote:
On Thu, Dec 12, 2013 at 3:18 AM, Mark Lawrence breamore...@yahoo.co.uk
wrote:
On 11/12/2013 16:04, Chris Angelico wrote:
I strongly believe that a career
programmer should learn as many languages and styles as possible,
the FSR, he *did* have one valid point about performance
that has now been fixed.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
to a regression being found.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 30 November 2013 03:15, Eamonn Rea eamonn...@gmail.com wrote:
Ok, here's the code:
[elided]
As I said, please also show the *exact* error - copy and paste the stack
trace.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
to a minimal example may reveal the
problem to you).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
think I can help
here, but I'm confused about unfamiliar phrase - could you or someone
else clarify please?
And if an unfamiliar dialect annoys you, killfile the person. No skin off
my nose.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
(i.e.
can't progress any further). Not much of an issue anymore since the
invention of the stump-jump plough:
https://en.wikipedia.org/wiki/Stump-jump_plough
(Looked it up, my guess is considered the most likely origin of the term).
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python
town was missing - added it:
https://en.wikipedia.org/wiki/Mittagong,_New_South_Wales
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
stranger to be exposing that data?
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
to potentially disastrous situations and yourself to lawsuits. It's not
a question of *if*, but *when* one of your customers is compromised to the
extent that they decide to take it out of you.
Also, you're an embarrassment to our profession.
Tim Delaney
--
https://mail.python.org/mailman
On 8 November 2013 09:45, Tim Delaney timothy.c.dela...@gmail.com wrote:
On 8 November 2013 09:18, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote:
I feel a bit proud because as it seems i have manages to secure it more
tight. All i need to do was to validate user input data, so the hacker
probably wrong - either your data is has patterns the algorithm can
exploit, or you've simply been lucky with the randomness of your data so
far.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
something *wrong* in Git.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 31 October 2013 08:31, Chris Angelico ros...@gmail.com wrote:
On Thu, Oct 31, 2013 at 7:19 AM, Tim Delaney
timothy.c.dela...@gmail.com wrote:
What it comes down to for me is that Mercurial usage fits in my head and
I
rarely have to go to the docs, whereas with Git I have to constantly
On 31 October 2013 08:43, Tim Delaney timothy.c.dela...@gmail.com wrote:
On 31 October 2013 08:31, Chris Angelico ros...@gmail.com wrote:
On Thu, Oct 31, 2013 at 7:19 AM, Tim Delaney
timothy.c.dela...@gmail.com wrote:
What it comes down to for me is that Mercurial usage fits in my head
to prevent
this - just looking at the code itself.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
, but I'll give
him (it?) this one chance to show the capability to read and learn.
http://en.wikipedia.org/wiki/Hexspeak
Search for 0xBAADF00D; 0xBADDCAFE; and (in particular) OxDEADBEEF. These
are historical examples of this technique used by major companies.
Tim Delaney
--
https
4 hours sleep - my
apologies to the list).
Anyway, not going to get sucked into this bottomless hole.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
to prefer an language named after a fish :-)
That would be https://en.wikipedia.org/wiki/Monty_Python not
https://en.wikipedia.org/wiki/Pythonidae.
The snake has been adopted as a mascot (see the Python icon) but is not the
inspiration.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python
there to check myself ...
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
to it could then execute arbitrary code on your system.
And there's also zero chance that your personal account login details are
also available in plaintext somewhere that you're unaware of.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
, keeping in mind that I am a newbie and that my
website project would be very simple and very small?
There is no *need* to use a web framework. But a web framework can make
things a lot easier for you.
Have a look at webapp2: http://webapp-improved.appspot.com/
Tim Delaney
--
https
. Note the
double space before %s - that matches your print statement (there would be
soft-space inserted in your print statement, which is another reason not to
rely on print for anything other than single strings). If you didn't want
that extra space, it's easy to delete.
Tim Delaney
--
https
no longer 40-chars-per-column and purely
upper-case like the Apple ][+ on which I cut my programming teeth.
Couldn't you switch the ][+ into high-res mode? You could with the IIe.
Made programming in DOS 3.3 BASIC so much nicer.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
is implemented
via __getattr__ / __getattribute__ / __setattr__ / __delattr__. From one
point of view, he's absolutely correct - nearly all attributes are accessed
via getters/setters in Python.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
does reflection automatically for you).
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
''
return str(value)
print(format(value))
This also allows you to format other types differently e.g. only output 2
decimal places for non-integer numeric types.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
provider's end.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
takes about 10% of the time.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 25 August 2013 07:59, Tim Delaney timothy.c.dela...@gmail.com wrote:
Breakdown of the above (for 19 digits):
d.as_tuple() takes about 35% of the time.
The multiply and add takes about 55% of the time.
The exponentiation takes about 10% of the time.
Bah - sent before complete.
Since
language which has immutable strings is completely insane you will have
no credibility and the only interest anyone will pay to your posts is
refuting your FUD so that people new to the language are not driven off
by you.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
.
The big difference between them is that the jmfbot does not appear to
evolve its routines in response to external sources - it seems to be stuck
in a closed feedback loop.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 13 July 2013 09:16, MRAB pyt...@mrabarnett.plus.com wrote:
On 12/07/2013 23:16, Tim Delaney wrote:
On 13 July 2013 03:58, Devyn Collier Johnson devyncjohn...@gmail.com
mailto:devyncjohnson@gmail.**com devyncjohn...@gmail.com wrote:
Thanks for the thorough response. I learned a lot
.
If you are finding that regular expressions are taking too much time, have
a look at the https://pypi.python.org/pypi/re2/ and
https://pypi.python.org/pypi/regex/2013-06-26 modules to see if they
already give you enough of a speedup.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python
as at some point I can sync the repositories, I can work away
(on things that are not dependent on something new from upstream).
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
be, set it appropriately from a
Mercurial extension and convince CCRC that really, only these files have
changed, not the thousand or so that just had their timestamp changed ...
CCRC at least made that possible, even if it was a complete accident by the
CCRC developers.
Tim Delaney
--
http
A programmer chooses his own clients, and you are the Atherton Wing to
my Inara Serra.
I've just been watching this train wreck (so glad I didn't get involved at
the start) but I have to say - that's brilliant Chris. Thank you for
starting my week off so well.
Tim Delaney
--
http
On 3 June 2013 09:10, Tim Delaney timothy.c.dela...@gmail.com wrote:
A programmer chooses his own clients, and you are the Atherton Wing to
my Inara Serra.
I've just been watching this train wreck (so glad I didn't get involved at
the start) but I have to say - that's brilliant Chris. Thank
to a single
thread + single semaphore slot I was able to turn it from a Heisenbug to a
100% replicable bug.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
, credits or license for more information.
class A(object):
... def f(self):
... print(A)
...
a=A()
print(id(a.f) == id(a.f), a.f is a.f)
True False
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
shown no
inclination to attempt to *fix* the regression and is rapidly coming to be
regarded as a troll by most participants in this list.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
.
Of course, you have to take into account in __eq__ that the other instance
may not have the same attributes (e.g. self is a subclass that uses extra
attributes in its __hash__ and __eq__).
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 15 January 2013 07:57, Chris Angelico ros...@gmail.com wrote:
Oh, and Dennis? Mal. Bad. From the Latin. :)
I was about to point out the same thing, using the same quote ;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
on Windows was taking orders of magnitudes longer than on
Linux due to use of string concatenation rather than the join idiom (from
~12 seconds spent on string concatenation to effectively zero).
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
into a
database of some form and using it's capabilities.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
, resist the urge. And if you can't prevent yourself from
replying to someone who has quoted one in order to tell them that the
person is a known troll/bot, tell them privately, not on the list.
Cheers,
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
text
from the troll/bot - fine. But any reference to the original will make it
harder for those of us who use bayesian-based spam filtering.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
they were using that as a euphamism for Python*ish* though.
[1] https://en.wikipedia.org/wiki/Inland_Taipan
[2] It's is so pretty:
https://upload.wikimedia.org/wikipedia/commons/f/fe/Fierce_Snake-Oxyuranus_microlepidotus.jpg
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 30 September 2012 09:26, Chris Angelico ros...@gmail.com wrote:
On Sun, Sep 30, 2012 at 6:51 AM, Tim Delaney
timothy.c.dela...@gmail.com wrote:
Personally I voted for the Fierce Snake[1][2] as the delimiter, but it
was
voted down as not Pythonic enough.
I'm sure they were using
.
Obviously monkey-patching the builtin module itself is much riskier,
because it doesn't just effect code in my module, it affects *everything*.
It's not as though the option to monkey-patch has been taken away. But
hopefully there is now less of a need for it.
Tim Delaney
--
http://mail.python.org
}@${HOSTNAME}:\[\033[0m\]\[\033[1;30m\]${PWD%%${PWD##$HOME}}\[\033[0m\]${PWD##$HOME}
'
It's designed to call as few external processes as possible (esp. when not
in a git repository) since it's used on Windows as well (msys, should work
in cygwin) and spawning on Windows is slow.
Tim Delaney
get back a reference to an inactive record? And if there is
indeed a problem, don't you already have a race condition on CPython?
1. Record is active;
2. Get reference to record through weak ref;
3. Record becomes inactive;
4. Start trying to use the (now inactive) record.
Tim Delaney
--
http
rec = record_weakrefs.get('record_name')
if rec is None:
rec = load_record()
record_weakrefs.put('record_name', rec)
with rec:
do_stuff
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
like names (in the Python sense) and leave everything
else up to the programmer. It's possible for the programmer to manually
intern their 1GB string, but they've then got to deal with the consequences
of doing so.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 125 matches
Mail list logo