Ben Finney :
> Since you don't care about identity, only that the objects have
> different values, you should be comparing for equality with ‘==’.
Ok, one last attempt.
I need *identifiers*. I could simply define:
class ABC:
A = object()
B = object()
C = object()
The pr
Steven D'Aprano :
> But I'm not sure that there is a good reason to put the class definitions
> inside the __init__ method. That means every time you create a new
> StateMachine instance, the classes have to be re-created.
>
> [...]
>
> It will be much more efficient if you pull all the Idle, et
Marko Rauhamaa writes:
> Ben Finney :
>
> > Since you don't care about identity, only that the objects have
> > different values, you should be comparing for equality with ‘==’.
>
> Ok, one last attempt.
>
> I need *identifiers*.
And, as you've realised, without an Enum pattern you have the opti
>
>
>
> Thanks Peter and Simon for the hints it worked : ) without ' ='
>
> # Python corrupt.py -o INODE -p /ifs/1.txt -q SET -f 1
>
> Current Default Choice :
>
> Choice: INODE
> Choice: SET
> Choice: 1
>
>
>
>
Iam done with the command line parsing but got stuck while trying to
implement sw
Ben Finney :
> Use ‘==’, since that's all that matters for getting a value that will
> work fine.
You are telling me to use '==' if I choose string objects and 'is' if I
choose some other objects.
I prefer a solution that works regardless of what objects I choose for
identifiers.
There really i
Ganesh Pal wrote:
> Iam using the options.name directly for manipulations is this fine or do
> I need to assign it to variable and then use it
> if options.object_type == 'LIN':
>corrupt_inode()
This is fine. You would only consider storing the value if you are going to
use it very of
On Sat, 01 Mar 2014 16:43:11 +0530, Ganesh Pal wrote:
> Iam done with the command line parsing but got stuck while trying to
> implement switch kind of behavior with dictionaries. So posting 2 more
> questions
You should start new threads for new questions. The subject line here has
nothing to
On Sat, Mar 1, 2014 at 10:28 PM, Marko Rauhamaa wrote:
> Ben Finney :
>
>> Use ‘==’, since that's all that matters for getting a value that will
>> work fine.
>
> You are telling me to use '==' if I choose string objects and 'is' if I
> choose some other objects.
>
> I prefer a solution that works
>
> handler = object_type_dictionary[options.object_type] # look up the
> function
> handler() # call it
>
> The last two lines could also be merged into one
>
> object_type_dictionary[options.object_type]()
>
> but the first version may be clearer.
>
>
Thanks for your valuable inputs all worked
On Sat, Mar 1, 2014 at 5:17 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
>
> You should start new threads for new questions. The subject line here has
> nothing to do with the questions you ask.
>
>
Sure Steven and thanks for replying and your suggestion for Question 2
(
Marko Rauhamaa writes:
> Ben Finney :
>
> > Use ‘==’, since that's all that matters for getting a value that will
> > work fine.
>
> You are telling me to use '==' if I choose string objects and 'is' if I
> choose some other objects.
No. I'm telling you that ‘is’ is *wrong* for comparing strings
graeme.piete...@gmail.com, 24.02.2014 10:45:
> I am building HTML pages using ElementTree.
> I need to insert chunks of untrusted HTML into the page. I do not need or
> want to parse this, just insert it at a particular point as is.
How would you want to find out if it can be safely inserted or n
On 01/03/2014 06:16, Mark H. Harris wrote:
On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
How would you propose doing that? Bear in mind that while Python
knows that tuples specifically are immutable, it doesn't generally
know whether a type is immutable.
hi Ian, consider the
>BREAKING FUCKING NEWS, ASSHOLES!
>
THRINAXODON JUST FOUND THREE HUMAN FOSSILS FROM DEVONIAN STRATA IN
GREENLAND; THE FOSSILS WERE A HUMAN FEMUR, KNEECAP, AND SKULLCAP.
>
THE SMITHSONIAN IS CHASTISING OVER THESE FINDS, DOING EVERY
On 01/03/2014 11:59, Chris Angelico wrote:
On Sat, Mar 1, 2014 at 10:28 PM, Marko Rauhamaa wrote:
There really is no taboo against string object identity if you know what
you are doing.
And, as proven here in this thread, you do not know what you are doing.
Why do you think I admitted him
On 03/01/2014 04:28 AM, Marko Rauhamaa wrote:
> Ben Finney :
>
>> Use ‘==’, since that's all that matters for getting a value that will
>> work fine.
>
> You are telling me to use '==' if I choose string objects and 'is' if I
> choose some other objects.
No, '==' works fine no matter what object
On Sat, 01 Mar 2014 22:59:52 +1100, Chris Angelico wrote:
> On Sat, Mar 1, 2014 at 10:28 PM, Marko Rauhamaa
> wrote:
>> Ben Finney :
>>
>>> Use ‘==’, since that's all that matters for getting a value that will
>>> work fine.
>>
>> You are telling me to use '==' if I choose string objects and 'is'
On Sat, 01 Mar 2014 12:31:39 +0200, Marko Rauhamaa wrote:
> I need *identifiers*. I could simply define:
>
>class ABC:
>A = object()
>B = object()
>C = object()
>
> The program would work perfectly.
>
> Except, if it's got a bug. I know self.abc contains either A, B
Ben Finney :
> No. I'm telling you that ‘is’ is *wrong* for comparing strings,
> because it is unreliable.
No, it isn't as long as the string object references have a common
assignment "pedigree." Assignment (including parameter passing) is
guaranteed to preserve identity of any object.
Marko
-
On Sun, Mar 2, 2014 at 4:07 AM, Steven D'Aprano
wrote:
> On Sat, 01 Mar 2014 22:59:52 +1100, Chris Angelico wrote:
>> And, as proven here in this thread, you do not know what you are doing.
>
> Steady on, that's a bit harsh. In context, I think that Marko is assuming
> that the caller will only ev
On Sun, Mar 2, 2014 at 4:23 AM, Marko Rauhamaa wrote:
> Ben Finney :
>
>> No. I'm telling you that ‘is’ is *wrong* for comparing strings,
>> because it is unreliable.
>
> No, it isn't as long as the string object references have a common
> assignment "pedigree." Assignment (including parameter pas
Michael Torrie :
> No, '==' works fine no matter what objects you assign to your state
> variables.
Well, it doesn't since
>>> a = float("nan")
>>> a is a
True
>>> a == a
False
More generally, it depends on how the __eq__ method has been implemented
for the class. You might even
On Sun, Mar 2, 2014 at 4:29 AM, Marko Rauhamaa wrote:
> You might even (foolishly) define a class such that:
>
>>>> a == b
>False
>>>> a != b
>False
Not necessarily even foolish; the SQL NULL value [1] behaves like that.
ChrisA
[1] Which isn't a value, except when it is
--
http
Hello everybody, I implemented a password validation with a Python 2.7.5 script
in OpenSUSE 13.1. The user calls it passing 'login' and 'password' as
arguments. I made a dictionary in the format hashtable = {'login':'password'}
and I use this hash table to compare the 'login' and 'password' that
On 3/1/14 12:50 AM, Mark H. Harris wrote:
On Friday, February 28, 2014 11:34:56 PM UTC-6, Ian wrote:
One very common example of tuples containing lists is when lists are
passed to any function that accepts *args, because the extra arguments
are passed in a tuple. A similarly common example is
Try this
def guess1(upLimit = 100):
import random
num = random.randint(1,upLimit)
count = 0
gotIt = False
while (not gotIt):
print('Guess a number between 1 and', upLimit, ':')
guess= int(input())
count += 1
if guess == num:
print('
On 03/01/2014 10:29 AM, Marko Rauhamaa wrote:
> Michael Torrie :
>
>> No, '==' works fine no matter what objects you assign to your state
>> variables.
>
> Well, it doesn't since
>
>>>> a = float("nan")
>>>> a is a
>True
>>>> a == a
>False
>
> More generally, it depends on h
On Sun, Mar 2, 2014 at 4:49 AM, Renato wrote:
> Hello everybody, I implemented a password validation with a Python 2.7.5
> script in OpenSUSE 13.1. The user calls it passing 'login' and 'password' as
> arguments. I made a dictionary in the format hashtable = {'login':'password'}
> and I use thi
Steven D'Aprano :
> It seems to me that he's just assuming that symbols ought to be
> singletons, hence his focus on identity rather than equality.
Yes.
A practical angle is this: if I used strings as symbols and compared
them with "==", logically I shouldn't define them as constants but
simply
On 01.03.2014 19:11, Chris Angelico wrote:
> On Sun, Mar 2, 2014 at 4:49 AM, Renato wrote:
>> Hello everybody, I implemented a password validation with a Python 2.7.5
>> script in OpenSUSE 13.1. The user calls it passing 'login' and 'password' as
>> arguments. I made a dictionary in the format h
On 2014-03-02 05:11, Chris Angelico wrote:
> On Sun, Mar 2, 2014 at 4:49 AM, Renato wrote:
> > My question is: is there a way of preventing the user from
> > reading the script's content?
Not really. It might be a bit obfuscated, but
>> Is there any strategy I could use to hide the passwords f
On Sun, Mar 2, 2014 at 5:38 AM, Tim Chase wrote:
> That said, if the user has access to the source code, there's nothing
> preventing them from changing
>
> if hash(provided_password) == existing_hash:
> do_magic()
>
> into just
>
> if True:
> do_magic()
>
> and re-running the program.
On Sun, Mar 2, 2014 at 5:31 AM, Christian Heimes wrote:
> encrypted = hashlib.sha256(login+'NaCl protects your
> passwords'+password).hexdigest()
> encrypted
>> 'b329f2674af4d8d873e264d23713ace4505c211410eb46779c27e02d5a50466c'
>
> Please don't do that. It's insecure and not the prope
On 27 February 2014 21:47, Nick Timkovich wrote:
> On Thu, Feb 27, 2014 at 10:33 AM, Chris Angelico wrote:
>>
>> It's unintuitive, but it's a consequence of the way += is defined. If
>> you don't want assignment, don't use assignment :)
>
> Where is `.__iadd__()` called outside of `list += X`?
N
Hi
Can anyone help with this problem
Create a big box out of n rows of little o's for any desired size n. Use an
input statement to allow the user to enter the value for n and then print the
properly sized box.
E.g. n = 3
oo
oo
oo
E.g
On Sun, Mar 2, 2014 at 6:12 AM, wrote:
> Create a big box out of n rows of little o's for any desired size n. Use an
> input statement to allow the user to enter the value for n and then print the
> properly sized box.
How far have you gotten so far with your homework? Show us some code
and we
Well, This is what i got
n = int(input("enter number of o: "))
for i in range(n):
print("O", end = '')
for j in range(n* 2):
print("O", end = '')
print()
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-03-01 19:28, genius...@gmail.com wrote:
Well, This is what i got
n = int(input("enter number of o: "))
for i in range(n):
print("O", end = '')
for j in range(n* 2):
print("O", end = '')
print()
From the examples:
The first row has n*2 of 'o'
There are n-2
On Fri, Feb 28, 2014 at 11:25 PM, Mark H. Harris wrote:
> On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
>
>> How would you propose doing that? Bear in mind that while Python
>> knows that tuples specifically are immutable, it doesn't generally
>> know whether a type is immutable.
>
>
On Sun, Mar 2, 2014 at 6:28 AM, wrote:
> Well, This is what i got
>
> n = int(input("enter number of o: "))
>
> for i in range(n):
> print("O", end = '')
> for j in range(n* 2):
> print("O", end = '')
>
> print()
Okay! Good. Now, presumably this isn't working yet, or you woul
On 01.03.2014 19:45, Chris Angelico wrote:
> On Sun, Mar 2, 2014 at 5:31 AM, Christian Heimes wrote:
>> encrypted = hashlib.sha256(login+'NaCl protects your
>> passwords'+password).hexdigest()
>> encrypted
>>> 'b329f2674af4d8d873e264d23713ace4505c211410eb46779c27e02d5a50466c'
>>
>> Pl
Hi,
###in.txt
cp -v --remove-destination /usr/share/zoneinfo/
\
/etc/localtime
import sys
import unicodedata
from bs4 import BeautifulSoup
file_name="in.txt"
html_doc=open(file_name,'r')
soup=BeautifulSoup(html_doc)
#print soup.prettify().encode('utf-8')
#file_to_write.writ
On Sun, Mar 2, 2014 at 6:54 AM, Christian Heimes wrote:
> Yes, for most applications brute force is still the best option to crack
> the password. Passwords are usually rather short, have a low entropy and
> modern hardware is insanely fast. With software like [1] and a fast GPU
> it is possible t
On Saturday, March 1, 2014 8:54:43 AM UTC-6, Mark Lawrence wrote:
> you're also using google groups... it doesn't wrap paragraphs
>
> correctly... please read and action this
>
> https://wiki.python.org/moin/GoogleGroupsPython... it does wrap
>
> paragraphs correctly... it also prevents
In article <2465a8c7-ce0e-4606-ad3b-9135c96e3...@googlegroups.com>,
twiz wrote:
> Hello,
>
> I'm sure this is a common question but I can't seem to find a previous thread
> that addresses it. If one one exists, please point me to it.
>
> I've been developing with python recreationally for a
On 2014-02-23, Sam wrote:
> My understanding of Python tuples is that they are like immutable
> lists. If this is the cause, why can't we replace tuples with lists
> all the time (just don't reassign the lists)? Correct me if I am
> wrong.
In addition to the things related to one being mutable a
In article <64af70e3-6876-4fbf-8386-330d2f487...@googlegroups.com>,
Sam wrote:
> My understanding of Python tuples is that they are like immutable lists. If
> this is the cause, why can't we replace tuples with lists all the time (just
> don't reassign the lists)? Correct me if I am wrong.
Th
In article ,
Grant Edwards wrote:
> In constrast, tuples are often used as fixed-length heterogenous
> containers (more like a struct in C except the fields are named 0, 1,
> 2, 3, etc.). In a particular context, the Nth element of a tuple will
> always mean one thing (e.g. a person's last name
In article ,
Mark Lawrence wrote:
> On 24/02/2014 00:55, alex23 wrote:
> > On 23/02/2014 3:43 PM, Scott W Dunning wrote:
> >> I had a question regarding functions. Is there a way to call a
> >> function multiple times without recalling it over and over. Meaning
> >> is there a way I can call a
On 2014-02-24, Benjamin Kaplan wrote:
> On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote:
>> On 24/02/2014 11:09 AM, Mark Lawrence wrote:
>>>
>>> On 24/02/2014 00:55, alex23 wrote:
for _ in range(5):
func()
>>>
>>>
>>> the obvious indentation error above
>>
>>
>> Stupid
On 2014-02-24, Michael Torrie wrote:
> On 02/24/2014 11:05 AM, j.e.ha...@gmail.com wrote:
>> typedef struct {
>> int value;
>> } Number;
>>
>> Number *o;
>> o = malloc(sizeof(*o));
>> o->value=3;
>> printf("o<%p>, o->value<%p>\n", o, &o->value);
>>
>> o<0x9fe5008>, o->value<0x9fe5008>
On 2014-02-25, mauro wrote:
> Dictionaries and sets share a few properties:
> - Dictionaries keys are unique as well as sets items
> - Dictionaries and sets are both unordered
> - Dictionaries and sets are both accessed by key
> - Dictionaries and sets are both mutables
>
> So I wonder why operat
On 2014-02-24, Chris Angelico wrote:
> So pick any distro that strikes your fancy! Try it out! If it doesn't
> work out, pick a different one. Start with one that your friends use
> (if you have any), that way you can get immediate help.
That last bit of advice shouldn't be overlooked. If you'r
In article <65ac9612-fd48-472a-b077-c802be96e...@googlegroups.com>,
Ronaldo wrote:
> How do I write a state machine in python? I have identified the states and
> the conditions. Is it possible to do simple a if-then-else sort of an
> algorithm? Below is some pseudo code:
>
> if state == "ABC"
On 2014-02-28, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Can you elaborate on this "nonliteral constants" point? How is it a
>> problem if DISCONNECTING isn't technically a constant? It follows the
>> Python convention of being in all upper-case, so the programmer
>> understands not to rebind
On 2014-02-28, Chris Angelico wrote:
> The problem does have to believe that the rubber duck/teddy
> bear/figurine is an expert, though. I've had my siblings or parents
> come to me with problems and, without saying a word or touching the
> computer or anything, I've solved them. The problem itse
In mauro writes:
> - Dictionaries and sets are both accessed by key
As far as I have used sets, they are not accessed by key.
>>> x = set([1, 2, 'buckle my shoe'])
>>> x
set([1, 2, 'buckle my shoe'])
>>> 1 in x
True
>>> 5 in x
False
--
John Gordon Imagine what it must be like for a r
In article ,
Unix SA wrote:
> Hello Experts,
>
> I have requirement, like i want to use below command in python script.
>
> --username --passwordarguments>
>
> now my requirement is i want to write some class so i can re-use "
> --username --password " part via importing as module
> or
On Sat, Mar 1, 2014 at 10:06 AM, Marko Rauhamaa wrote:
> A colleague of mine taught me decades back that the whole point of OO
> was the avoidance of if and switch statements. So if your code has an if
> or switch statement, chances are you are doing something wrong.
This sounds like a classic ca
In article <87d2i7wbxs@elektro.pacujo.net>,
Marko Rauhamaa wrote:
> Neil Cerutti :
>
> > Check out Go's switch statement for an example of what it might
> > look like in Python. Except you'd get it without labeled break or
> > the fallthrough statement.
Python already has a switch statemen
On 2014-02-28, Marko Rauhamaa wrote:
> Here's a use case for "is" with strings (or ints):
>
>class Connection:
>IDLE = "IDLE"
>CONNECTING = "CONNECTING"
>CONNECTED = "CONNECTED"
>DISCONNECTING = "DISCONNECTING"
>DISCONNECTED = "DISCONNECTED"
>
>
On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
> How would you propose doing that? Bear in mind that while Python
> knows that tuples specifically are immutable, it doesn't generally
> know whether a type is immutable.
hi Ian, I thought of something else after I slept on it, so to
On 2014-02-28, Mark Lawrence wrote:
> http://c2.com/cgi/wiki?SwitchStatementsSmell
So lack of a switch state is an attempt to force Python programmers to
write things in an "object oriented" way?
--
Grant Edwards grant.b.edwardsYow! FUN is never having to
In article <0b414429-74ee-45dd-9465-c87e98c36...@googlegroups.com>,
"Mark H. Harris" wrote:
> On Friday, February 28, 2014 3:03:25 PM UTC-6, Marko Rauhamaa wrote:
> >
> > Marko
>
>... and between me and you, here is a snip from dmath.py from the atan(x)
>function:
>
> if (n**2 <
In article ,
Ben Finney wrote:
> Of course. That's the point of describing something as a âcode smellâ:
> it may have exceptions where the smell does not indicate an actual
> problem, but those are not the normal case where the smell is
> encountered. More often, it indicates a problem that
On 23/02/2014 17:48, Roy Smith wrote:
In article ,
Grant Edwards wrote:
In constrast, tuples are often used as fixed-length heterogenous
containers (more like a struct in C except the fields are named 0, 1,
2, 3, etc.). In a particular context, the Nth element of a tuple will
always mean on
In article <87mwh9969m@elektro.pacujo.net>,
Marko Rauhamaa wrote:
> Michael Torrie :
>
> > No, '==' works fine no matter what objects you assign to your state
> > variables.
>
> Well, it doesn't since
>
>>>> a = float("nan")
>>>> a is a
>True
>>>> a == a
>False
>
> Mo
In article ,
Christian Heimes wrote:
> With software like [1] and a fast GPU
> it is possible to do more than 10*10^9 checks/second for SHA-256.
Just out of curiosity, how does that differ from 10^10 checks/second?
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, March 1, 2014 12:24:15 AM UTC-6, Chris Angelico wrote:
> much code. If you want to change anything, you potentially have to
>
> edit three places: the list of constants at the top, the condition
>
> function, and the switch.
>
>
>
> This can't be your idea of readability. Show me
On 01/03/2014 21:40, Mark H. Harris wrote:
On Saturday, March 1, 2014 12:24:15 AM UTC-6, Chris Angelico wrote:
much code. If you want to change anything, you potentially have to
edit three places: the list of constants at the top, the condition
function, and the switch.
This can't be your i
On Saturday 01 March 2014 16:52:44 Grant Edwards did opine:
> On 2014-02-28, Chris Angelico wrote:
> > The problem does have to believe that the rubber duck/teddy
> > bear/figurine is an expert, though. I've had my siblings or parents
> > come to me with problems and, without saying a word or tou
On 01.03.2014 21:25, Roy Smith wrote:
> In article ,
> Christian Heimes wrote:
>
>> With software like [1] and a fast GPU
>> it is possible to do more than 10*10^9 checks/second for SHA-256.
>
> Just out of curiosity, how does that differ from 10^10 checks/second?
I find 10 * 10^9 easier to
On Saturday, March 1, 2014 4:01:12 PM UTC-6, Mark Lawrence wrote:
>
> No elipses, just the paragraphs not wrapped and the double line spacing.
>
> Good old gg, I just love it.
How do I fix it? Is there a setting someplace? I tried pulling up the page
you linked, but blank.
Thanks in adv
On Sun, Mar 2, 2014 at 8:40 AM, Mark H. Harris wrote:
> hi Chris, I don't think you're wrong. There are two issues for me (and one
> of them is not how the switch is implemented).
>
> 1) Is it easier for average users of python as a language to read switch case
> default, or if elif else ?
>
On Sun, Mar 2, 2014 at 9:07 AM, Christian Heimes wrote:
> On 01.03.2014 21:25, Roy Smith wrote:
>> In article ,
>> Christian Heimes wrote:
>>
>>> With software like [1] and a fast GPU
>>> it is possible to do more than 10*10^9 checks/second for SHA-256.
>>
>> Just out of curiosity, how does tha
On Sat, Mar 1, 2014 at 1:31 AM, Grant Edwards wrote:
> You drag out the lab scope, logic analyzer, spectrum analyzer, sweep
> generator, strip plotter, and the machine that goes "ping". You start
> to get everything set up to nail that problem securely to the
> dissecting board. Long before you
On Wed, Feb 26, 2014 at 7:44 AM, John Gordon wrote:
> In mauro
> writes:
>
>> - Dictionaries and sets are both accessed by key
>
> As far as I have used sets, they are not accessed by key.
>
x = set([1, 2, 'buckle my shoe'])
x
> set([1, 2, 'buckle my shoe'])
1 in x
> True
5
Marko Rauhamaa writes:
> Steven D'Aprano :
>
> > It seems to me that he's just assuming that symbols ought to be
> > singletons, hence his focus on identity rather than equality.
>
> Yes.
Give that up, then. Your assumption is false in Python, and is not
needed to get the behaviour you say you n
On Sunday, February 23, 2014 2:43:14 AM UTC-6, twiz wrote:
> I'm sure this is a common question but I can't seem to find a previous thread
> that addresses it. If one one exists, please point me to it.
My personal preference for writing and testing python code is Gnu/Linux as a
platform (free
Marko Rauhamaa writes:
> Ben Finney :
>
> > No. I'm telling you that ‘is’ is *wrong* for comparing strings,
> > because it is unreliable.
>
> No, it isn't as long as the string object references have a common
> assignment "pedigree." Assignment (including parameter passing) is
> guaranteed to pre
Grant Edwards writes:
> On 2014-02-28, Mark Lawrence wrote:
>
> > http://c2.com/cgi/wiki?SwitchStatementsSmell
>
> So lack of a switch state is an attempt […]
Since when is the absence of action an “attempt” to do anything?
You're assuming the not-doing of something must have a purpose. That
a
On Saturday, March 1, 2014 4:36:07 PM UTC-6, Ben Finney wrote:
> Since when is the absence of action an "attempt" to do anything?
>
> You're assuming the not-doing of something must have a purpose. That
> assumption doesn't seem justified.
Correct. Argument from silence is logical fallacy; lack
On Sun, Mar 2, 2014 at 9:32 AM, Mark H. Harris wrote:
> Py3.3.4 and the latest Active TCL are stable on OSX 10.6 or higher. I have
> been very pleased with IDLE on both Gnu/Linux and OSX ( I refuse to use
> Windows ever again, ever) and my latest experience has been fabulous, really.
> My hat
In article <4e741358-ce12-40ac-97b8-3bbbf2d6d...@googlegroups.com>,
"Mark H. Harris" wrote:
> [...]
> The main problem you will see with OSX (if you're not careful) is that IDLE
> will be unstable. To be fair about it, its not IDLE's problem, per se. Its
> about tcl/tk tkinter. DO NOT use th
On Sat, 01 Mar 2014 20:25:51 +0200, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> It seems to me that he's just assuming that symbols ought to be
>> singletons, hence his focus on identity rather than equality.
>
> Yes.
>
> A practical angle is this: if I used strings as symbols and compared
>
On 3/1/2014 4:20 PM, Mark Lawrence wrote:
On 23/02/2014 17:48, Roy Smith wrote:
It also appears that tuples are more memory efficient. I just ran some
quick tests on my OSX box. Creating a list of 10 million [1, 2, 3, 4,
5] lists gave me a 1445 MB process. The name number of (1, 2, 3, 4, 5
On 01/03/2014 22:07, Mark H. Harris wrote:
On Saturday, March 1, 2014 4:01:12 PM UTC-6, Mark Lawrence wrote:
No elipses, just the paragraphs not wrapped and the double line spacing.
Good old gg, I just love it.
How do I fix it? Is there a setting someplace? I tried pulling up the page
On Saturday, March 1, 2014 5:21:57 PM UTC-6, Mark Lawrence wrote:
> https://wiki.python.org/moin/GoogleGroupsPython
Thanks, Mark. Whoohoo! Looks like gg has some work to do. rats(). Ok, so I'm
typing away here and when
I get to the boarder I should press the enter key so that the text is forced
On Sun, Mar 2, 2014 at 11:23 AM, Mark H. Harris wrote:
> On Saturday, March 1, 2014 5:21:57 PM UTC-6, Mark Lawrence wrote:
>
>> https://wiki.python.org/moin/GoogleGroupsPython
>
> Thanks, Mark. Whoohoo! Looks like gg has some work to do. rats(). Ok, so I'm
> typing away here and when
> I get to
On 02/03/2014 00:23, Mark H. Harris wrote:
On Saturday, March 1, 2014 5:21:57 PM UTC-6, Mark Lawrence wrote:
https://wiki.python.org/moin/GoogleGroupsPython
Thanks, Mark. Whoohoo! Looks like gg has some work to do. rats(). Ok, so I'm
typing away here and when
I get to the boarder I should p
On Saturday, March 1, 2014 12:55:07 AM UTC-6, Anssi Saari wrote:
> I recently watched a presentation by Jessica McKellar of PSF about what
> Python needs to stay popular. Other than the obvious bits (difficulties
> of limited support of Python on major platforms like Windows and mobile)
> the sligh
On 01Mar2014 15:07, Ned Deily wrote:
> In article <4e741358-ce12-40ac-97b8-3bbbf2d6d...@googlegroups.com>,
> "Mark H. Harris" wrote:
> > [...]
> > If you want to use terminals on OSX you'll want to install Quartz and run
> > the terminal on the emulated X environment. It works better for pyt
In article
,
Chris Angelico wrote:
> What I would recommend, if you don't feel like setting up NNTP, is to
> subscribe to the mailing list:
>
> https://mail.python.org/mailman/listinfo/python-list
>
> All the same content, but via email instead. Take your pick between
> that and a newsreader -
On Mar 1, 2014, at 11:03 AM, Susan Aldridge wrote:
> Try this
>
> def guess1(upLimit = 100):
>import random
>num = random.randint(1,upLimit)
>count = 0
>gotIt = False
>while (not gotIt):
>print('Guess a number between 1 and', upLimit, ':')
>guess= int(input())
On 02/03/2014 00:55, Ned Deily wrote:
In article
,
Chris Angelico wrote:
What I would recommend, if you don't feel like setting up NNTP, is to
subscribe to the mailing list:
https://mail.python.org/mailman/listinfo/python-list
All the same content, but via email instead. Take your pick betw
On Sun, Mar 2, 2014 at 12:11 PM, Scott W Dunning wrote:
>>print('You got it in ', count, 'guesses.')
>>
> Thanks Susan! The only problem is he wants us to do it without loops because
> we haven’t learned them yet. I need to use the variables and function names
> that he’s given as well. I
Le 01/03/2014 22:21, Mark H. Harris a écrit :
> The point I'm trying to make with this post is that s[2]+=[46] and
> s[2]=s[2]+[46] are handled inconsistently.
For my own, the fact that, in Python, a_liste += e_elt gives a different
result than a_list = a_list + e_elt is a big source of trou
On Saturday, March 1, 2014 3:21:44 PM UTC-6, Mark H. Harris wrote:
> On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:
hi Ian, I thought of something else after I slept on it, so to speak.
Consider this:
>>> s=(2,3,[42,43,44],7)
>>> s[2]
[42, 43, 44]
>>>
s[2] is a list. We shoul
On Saturday, March 1, 2014 8:04:32 PM UTC-6, Eric Jacoboni wrote:
>
>
> In fact, i think i'm gonna forget += on lists :)
hi Eric, well, that might be extreme, but you certainly want to avoid
trying to change an immutable. Something you might want to consider
is trying something like creating a n
On Mar 1, 2014, at 9:35 AM, Dennis Lee Bieber wrote:
> Without loops, one part of your assignment is going to be tedious,
> unless the intent is to only allow for one guess per run.
No, 10 guesses per game. Yes very tedious and repetative.
>
>> from random import randrange
>> randrange(1,
1 - 100 of 109 matches
Mail list logo