On Sun, Jan 18, 2015 at 2:45 PM, Steven D'Aprano
wrote:
> (I am very cynical about most of the "security features" the banks are
> pushing for, since in my opinion they are more about giving the banks
> plausible deniablity so they can push responsibility for security breaches
> onto the customer.
On Sun, Jan 18, 2015 at 2:50 PM, Tim Chase
wrote:
> You think that's bad, one million Google Authenticator 2-factor
> verification codes were leaked:
>
> https://twitter.com/paulmutton/status/509991378647277568
>
> Those hackers are a wily bunch. ;-)
http://torrent-city.net/download/Li/List-of-A
On 2015-01-17 22:18, Roy Smith wrote:
> Tell me about it. I have an E-Trade ATM card. When I first got
> it, I set it up with a 6 digit PIN. I was shocked to discover some
> time later that it actually only looks at the first 4 digits. And,
> no, I'm not talking *characters*, I'm talking *digit
Roy Smith wrote:
> In article <54bb1c83$0$12979$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> Even that doesn't protect you, because your security is controlled by
>> websites and banks etc. with stupid security policies. E.g. I am forced
>> to deal with one bank that uses
In article <54bb1c83$0$12979$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Even that doesn't protect you, because your security is controlled by
> websites and banks etc. with stupid security policies. E.g. I am forced to
> deal with one bank that uses a cryptographic key to sign
Ian Kelly wrote:
> On Sat, Jan 17, 2015 at 7:26 AM, Steven D'Aprano
> wrote:
>> I don't understand why they add the error tolerances together. I can
>> understand taking the minimum, or the maximum:
>
> The usual idea is that the tolerance is calculated as a relative
> value, but an absolute tol
Roy Smith wrote:
> In article <54ba5a25$0$12991$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> Whitespace is significant in nearly all programming languages, and so it
>> should be. Whitespace separates tokens, and lines, and is a natural way
>> of writing (at least for peop
Albert van der Horst wrote:
> In article , wrote:
>>Michael Torrie wrote:
>>> On 01/17/2015 07:51 AM, Albert van der Horst wrote:
>>> > In article ,
>>> > Chris Angelico wrote:
>>> >
>>> >>
>>> >> But sure. If you want to cut out complication, dispense with user
>>> >> accounts altogether an
On 01/17/2015 11:47 AM, Michael Ströder wrote:
>> sudo makes administrators careless, lazy and it is not simple at all.
>
> Admins must have separate accounts with separate credentials for
> administrative work and must be careful when using an administrative account.
Right. This is not a bad id
Sorry for necro.
On Sat, Dec 20, 2014 at 10:44 PM, Chris Angelico wrote:
> On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote:
>> Just to be clear, writing to sys.stdout works fine in Idle.
> import sys; sys.stdout.write('hello ')
>> hello #2.7
>>
>> In 3.4, the number of chars? bytes? is r
On Sun, Jan 18, 2015 at 10:46 AM, Steven D'Aprano
wrote:
> The merely poor reason given by the more thoughtful sys admins is, if the
> password hashes get stolen, the hacker has a maximum of N days (and
> possibly less) to crack the hashes and recover the passwords before they
> get changed. That'
Mark Lawrence wrote:
> Bah humbug, this has reminded me of doing secure work whereby each
> individual had two passwords, both of which had to be changed every
> thirty days, and rules were enforced so you couldn't just increment the
> number at the end of a word or similar.
I hate and despise sy
Jussi Piitulainen wrote:
I prefer parentheses.
They are not nearly as fragile.
So do I, but the other day I had occasion to write a
small piece of VBScript, and I discovered that it
actually *forbids* parens around the arguments to
procedure calls (but not function calls).
Fortunately, it requ
Albert van der Horst wrote:
Knowing that the source is an mbox file, I don't need to follow
that link to conclude that one is not very inventive.
It suffices to replace the content of the message by
a repetition of '\n'.
Editing the mbox file isn't the problem. From what I
gather, telling m
On Sun, Jan 18, 2015 at 8:56 AM, Gregory Ewing
wrote:
> Ruby doesn't have that problem because it doesn't
> have functions, only methods, and the only thing you
> can do with a method in Ruby is call it.
So functions aren't first-class objects in Ruby? Bleh. I've become
quite accustomed to passin
Chris Angelico wrote:
Every once in a while, someone looks at Py2's print statement and
Py3's print function and says, "why not allow function calls without
parentheses". This right here is why not.
There's also the fact that the parens are needed to
distinguish between calling a function and u
Steven D'Aprano wrote:
def a(x=4)
x+2
end
a + b => 7
a+b => 7
a+ b => 7
a +b => 3
A shiny new penny for any non-Ruby coder who can explain that!
Seems pretty obvious to me: the Ruby interpreter is
infested with demons.
DWIM = Demonic Whim Infers Meaning
--
Greg
--
https://mail.pyth
Yawar Amin wrote:
Cool ... but it looks like this can still potentially hit the max
recursion limit?
It depends on the nature of your data. If the data is
a tree, it's very unlikely you'll reach the recursion
limit unless the tree is massively unbalanced.
If there's a chance of that, or if th
Roy Smith wrote:
I will commonly put something like:
import logging
logger = logging.getLogger("logger-name-for-my-module")
But that's not really a global variable, it's a
global constant. There's nothing wrong with those,
we use them all the time -- classes, functions, etc.
If you were to re
On Sat, 17 Jan 2015 19:08:21 +, Dan Sommers wrote:
> On Sat, 17 Jan 2015 18:44:42 +, Grant Edwards wrote:
>
>> ... somebody who only knows how to write C++ [though he can do it in
>> several different languages].
>
> +1 QOTW (brilliant phrases in other threads are off topic and are
> dis
On Sun, Jan 18, 2015 at 4:30 AM, Albert van der Horst
wrote:
> The proper technique is make the global local to the normal subroutine,
> then make the subroutine with those parameters you don't want to see
> also local to that subroutine.
> E.g.
>
> def fib(n):
> ' return the n-th Fibonacci nu
On Sat, 17 Jan 2015 18:44:42 +, Grant Edwards wrote:
> ... somebody who only knows how to write C++ [though he can do it in
> several different languages].
+1 QOTW (brilliant phrases in other threads are off topic and are
disqualified)
I have also suffered through such maintenance, but I hav
On 2015-01-17, Roy Smith wrote:
> In article <54ba39e0$0$13008$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> Every time I think I would like to learn a new language, I quite quickly run
>> into some obvious feature that Python has but the newer language lacks, and
>> I think
alb...@spenarnc.xs4all.nl (Albert van der Horst) wrote:
> In article , wrote:
>> Michael Torrie wrote:
>>> On 01/17/2015 07:51 AM, Albert van der Horst wrote:
In article ,
Chris Angelico wrote:
>
> But sure. If you want to cut out complication, dispense with user
>
On 2015-01-16, Gregory Ewing wrote:
> We're really quite spoiled in Python-land. It's easy
> to forget just *how* spoiled we are until you go back
> and try to do something in one of the more primitive
> languages...
I had to do some work in PHP yesterday -- fixing up some code that was
written
On Sat, Jan 17, 2015 at 7:26 AM, Steven D'Aprano
wrote:
> I don't understand why they add the error tolerances together. I can
> understand taking the minimum, or the maximum:
The usual idea is that the tolerance is calculated as a relative
value, but an absolute tolerance is used instead when th
On Sat, 17 Jan 2015 21:33:19 +1100, Steven D'Aprano wrote:
> Gregory Ewing wrote:
>
>> Marko Rauhamaa wrote:
>>> Gregory Ewing :
>>>
If those are 24-bit RGB pixels, you could encode 3 characters in each
pixel.
>>>
>>> Not since Python3. Characters are Unicode now so you'll need to
>>> d
On 17/01/2015 16:47, c...@isbd.net wrote:
Michael Torrie wrote:
On 01/17/2015 07:51 AM, Albert van der Horst wrote:
In article ,
Chris Angelico wrote:
But sure. If you want to cut out complication, dispense with user
accounts altogether and run everything as root. That's WAY simpler!
I
In article , wrote:
>Michael Torrie wrote:
>> On 01/17/2015 07:51 AM, Albert van der Horst wrote:
>> > In article ,
>> > Chris Angelico wrote:
>> >
>> >>
>> >> But sure. If you want to cut out complication, dispense with user
>> >> accounts altogether and run everything as root. That's WAY si
In article <5e4ccec6-7a00-467d-8cf6-258ab0421...@googlegroups.com>,
Tim wrote:
>I have this type of situation and wonder if I should use a global
>variable outside the recursive function instead of passing the updated
>parameter through.
>
>I want to get a union of all the values that any 'things
In article <54ba5a25$0$12991$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Whitespace is significant in nearly all programming languages, and so it
> should be. Whitespace separates tokens, and lines, and is a natural way of
> writing (at least for people using Western languages)
In article ,
Skip Montanaro wrote:
> On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen
> wrote:
> > How far do you want to go? Is "a b + c" the same as "a(b) + c" or the
> > same as "a(b + c)"?
>
> I think there is only one practical interpretation, the one that all
> shells I'm familiar wit
In article <54ba39e0$0$13008$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Every time I think I would like to learn a new language, I quite quickly run
> into some obvious feature that Python has but the newer language lacks, and
> I think "bugger this for a game of soldiers" and
Michael Torrie wrote:
> On 01/17/2015 07:51 AM, Albert van der Horst wrote:
> > In article ,
> > Chris Angelico wrote:
> >
> >>
> >> But sure. If you want to cut out complication, dispense with user
> >> accounts altogether and run everything as root. That's WAY simpler!
> >
> > I didn't excep
In article ,
Chris Angelico wrote:
>On Sat, Jan 10, 2015 at 2:21 PM, Gregory Ewing
> wrote:
>> Skip Montanaro wrote:
>>>
>>> The way this is done, is
>>> that the message is removed from the underlying mbox file, and the
>>> archive regenerated. That changes the counter for every message after
>>
On 01/17/2015 07:51 AM, Albert van der Horst wrote:
> In article ,
> Chris Angelico wrote:
>
>>
>> But sure. If you want to cut out complication, dispense with user
>> accounts altogether and run everything as root. That's WAY simpler!
>
> I didn't except this strawman argument from you.
> Of c
Chris Angelico wrote:
> On Sun, Jan 18, 2015 at 1:51 AM, Albert van der Horst
> wrote:
> > In article ,
> > Chris Angelico wrote:
> >
> >>
> >>But sure. If you want to cut out complication, dispense with user
> >>accounts altogether and run everything as root. That's WAY simpler!
> >
> > I did
In article <54ba3654$0$13008$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Good reasons for using global variables are few and far between. Just about
> the only good reason for using global variables that I can think of is if
> you have one or more settings/preference that get s
In article ,
Chris Angelico wrote:
>On Fri, Jan 9, 2015 at 4:02 AM, Steve Hayes wrote:
>> On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst)
>> wrote:
>>
>>>I don't trust sudo because it is too complicated.
>>>(To the point that I removed it from my machine.)
>>>I do
>
On Sun, Jan 18, 2015 at 1:51 AM, Albert van der Horst
wrote:
> In article ,
> Chris Angelico wrote:
>
>>
>>But sure. If you want to cut out complication, dispense with user
>>accounts altogether and run everything as root. That's WAY simpler!
>
> I didn't except this strawman argument from you.
In article ,
Chris Angelico wrote:
>
>But sure. If you want to cut out complication, dispense with user
>accounts altogether and run everything as root. That's WAY simpler!
I didn't except this strawman argument from you.
Of course you need a distinction between doing system things as
root, and
Can anyone explain the rationale for numpy's allclose() semantics?
help(allclose) says:
allclose(a, b, rtol=1e-05, atol=1e-08)
Returns True if two arrays are element-wise equal within a tolerance.
The tolerance values are positive, typically very small numbers. The
relative differe
Il 17/01/2015 12.07, Marko Rauhamaa ha scritto:
> Jussi Piitulainen :
>
>> a+ b => 7 # a() + b
>> a +b => 3 # a(+b) => a(b) => a(1) = 1 + 2
>>
>> I'm not quite fond of such surprise in programming language syntax.
>
> Yes, whoever came up with the idea of whitespace having syntactic
> sig
On Sat, Jan 17, 2015 at 9:49 PM, Jussi Piitulainen
wrote:
> I've only seen small amounts of Ruby code on the net. The only way I
> can make some sense of that is if it gets analyzed as follows, using
> parentheses for calls:
>
> a + b => 7 # a() + b => a(4) + b => 4 + 2 + 1
> a+b => 7 # a()
Skip Montanaro writes:
> On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen wrote:
> > How far do you want to go? Is "a b + c" the same as "a(b) + c" or
> > the same as "a(b + c)"?
>
> I think there is only one practical interpretation, the one that all
> shells I'm familiar with have adopted:
>
Marko Rauhamaa writes:
> Seriously, though, I hate the optional semicolon rules of JavaScript
> and Go. I dread the day when GvR gets it in his head to allow this
> syntax in Python:
>
>average_drop_rate = cumulative_drop_count /
>observation_period
>
> (although, it could be defined
Jussi Piitulainen wrote:
> I've only seen small amounts of Ruby code on the net. The only way I
> can make some sense of that is if it gets analyzed as follows, using
> parentheses for calls:
>
> a + b => 7 # a() + b => a(4) + b => 4 + 2 + 1
> a+b => 7 # a() + b
> a+ b => 7 # a() + b
>
Marko Rauhamaa wrote:
> Jussi Piitulainen :
>
>> a+ b => 7 # a() + b
>> a +b => 3 # a(+b) => a(b) => a(1) = 1 + 2
>>
>> I'm not quite fond of such surprise in programming language syntax.
>
> Yes, whoever came up with the idea of whitespace having syntactic
> significance!
Yes, we shoul
Andrew, sorry for the delay in responding. Your response has been extremely
long, so for the interest of brevity I've tried to trim things down to the
most pertinent points.
Andrew Robinson wrote:
[...]
> So -- From my perspective, Guido making Python go from an open ended and
> permissive use of
Jussi Piitulainen :
> Marko Rauhamaa writes:
>> Yes, whoever came up with the idea of whitespace having syntactic
>> significance!
>
> How far do you want to go? [...]
>
> I prefer parentheses. They are not nearly as fragile.
*cough* braces *cough*
Seriously, though, I hate the optional semicolo
On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen
wrote:
> How far do you want to go? Is "a b + c" the same as "a(b) + c" or the
> same as "a(b + c)"?
I think there is only one practical interpretation, the one that all
shells I'm familiar with have adopted:
a(b, +, c)
> And I don't reall
Marko Rauhamaa writes:
> Jussi Piitulainen:
>
> > a+ b => 7 # a() + b
> > a +b => 3 # a(+b) => a(b) => a(1) = 1 + 2
> >
> > I'm not quite fond of such surprise in programming language
> > syntax.
>
> Yes, whoever came up with the idea of whitespace having syntactic
> significance!
How fa
After a creative and inspiring Friday afternoon, we are pleased to
announce our EuroPython 2015 landing page:
http://ep2015.europython.eu/
This will be the URL for EuroPython 2015 - definitely worth a
bookmark, we think :-)
Enjoy,
-—
EuroPython Society (EPS)
http://www.euro
Jussi Piitulainen :
> a+ b => 7 # a() + b
> a +b => 3 # a(+b) => a(b) => a(1) = 1 + 2
>
> I'm not quite fond of such surprise in programming language syntax.
Yes, whoever came up with the idea of whitespace having syntactic
significance!
Marko
--
https://mail.python.org/mailman/listinf
Steven D'Aprano writes:
> Ah, wait, I forgot Ruby's brilliant "feature" that whitespace
> *between* expressions is significant:
>
> [steve@ando ~]$ cat ~/coding/ruby/ws-example.rb
> #!/usr/bin/ruby
>
> def a(x=4)
> x+2
> end
>
> b = 1
> print "a + b => ", (a + b), "\n"
> print "a+b => ",
Gregory Ewing wrote:
> We're really quite spoiled in Python-land. It's easy
> to forget just how spoiled we are until you go back
> and try to do something in one of the more primitive
> languages...
Every time I think I would like to learn a new language, I quite quickly run
into some obvious fe
Gregory Ewing wrote:
> Marko Rauhamaa wrote:
>> Gregory Ewing :
>>
>>>If those are 24-bit RGB pixels, you could encode
>>>3 characters in each pixel.
>>
>> Not since Python3. Characters are Unicode now so you'll need to dedicate
>> a pixel for each character.
>
> Depends on which characters you
Tim wrote:
> I have this type of situation and wonder if I should use a global variable
> outside the recursive function instead of passing the updated parameter
> through.
To a first approximation, the answer to:
"I have a X, should I use a global variable or a parameter?"
is *always* "use a p
58 matches
Mail list logo