On Wed, Feb 12, 2014 at 6:49 PM, wrote:
> The day you find an operator working on the set of
> reals (R) and it is somehow "optimized" for N
> (the subset of natural numbers), let me know.
I have yet to find any computer that works with the set of real
numbers in any way. Never mind optimization
John Allsup writes:
> What is needed for proper learning is near-absolute simplicity.
I think that's too simplistic :-) but I'll take it as merely a
preference on your part for simplicity at this time.
> I want to be able to say:
> 1. Put a nice picture on the background.
> 2. Put a ter
Chris Angelico writes:
> I have yet to find any computer that works with the set of real
> numbers in any way. Never mind optimization, they simply cannot work
> with real numbers.
Not *any* computer? Not in *any* way? The Python built-in ‘float’ type
“works with the set of real numbers”, in a w
Integers are integers. (1)
Characters are characters. (2)
(1) is a unique "natural" set.
(2) is an artificial construct working
with 3 sets (unicode).
jmf
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney wrote:
> Chris Angelico writes:
>
>> I have yet to find any computer that works with the set of real
>> numbers in any way. Never mind optimization, they simply cannot work
>> with real numbers.
>
> Not *any* computer? Not in *any* way? The Python built
Le mercredi 12 février 2014 09:35:38 UTC+1, wxjm...@gmail.com a écrit :
> Integers are integers. (1)
>
> Characters are characters. (2)
>
>
>
> (1) is a unique "natural" set.
>
>
>
> (2) is an artificial construct working
>
> with 3 sets (unicode).
>
>
>
> jmf
Addendum: One should not c
I started learning python 3.3 for 13 days (including today) ago, using this
book, with no programming experience:
http://openbookproject.net/thinkcs/python/english3e/index.html
the fact that the author uses the python turtle to teach readers object
orientated programming,
has been ALL the differen
On Tuesday 11 February 2014 23:13:33 Roy Smith did opine:
> In article ,
>
> ngangsia akumbo wrote:
> > Please i have a silly question to ask.
> >
> > How long did it take you to learn how to write programs?
>
> I've been working on it for 40 years. I'll let you know when I get
> there.
I s
wxjmfa...@gmail.com writes:
> (2) is an artificial construct working
> with 3 sets (unicode).
jmf, you are being exceedingly disruptive: attempting to derail
unrelated discussions for your favourite hobby-horse topic. Please stop.
Everyone else: Please don't engage these attempts; instead, avoid
Chris Angelico writes:
> On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney
> wrote:
> > Chris Angelico writes:
> >
> >> I have yet to find any computer that works with the set of real
> >> numbers in any way. Never mind optimization, they simply cannot
> >> work with real numbers.
> >
> > Not *any*
Chris Angelico writes:
> On Wed, Feb 12, 2014 at 6:49 PM, wrote:
> > The day you find an operator working on the set of
> > reals (R) and it is somehow "optimized" for N
> > (the subset of natural numbers), let me know.
...
> In Python, integers have arbitrary precision, but floats, Fractions,
On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney wrote:
> So, if I understand you right, you want to say that you've not found a
> computer that works with the *complete* set of real numbers. Yes?
Correct. When jmf referred to real numbers, he implied that there are
no optimizations done for natural n
On Wed, Feb 12, 2014 at 7:57 PM, Jussi Piitulainen
wrote:
>> In Python, integers have arbitrary precision, but floats, Fractions,
>> and Decimals, don't. Nearly any operation on arbitrarily large
>> numbers will be either more accurate or more efficient (maybe both)
>> with integers than with any
Chris Angelico writes:
> On Wed, Feb 12, 2014 at 7:17 PM, Ben Finney wrote:
> > What specific behaviour would, for you, qualify as “works with the
> > set of real numbers in any way”?
>
> Being able to represent surds, pi, e, etc, for a start. It'd
> theoretically be possible with an algebraic not
ANNOUNCING
eGenix.com mxODBC Connect
Python ODBC Database Interface
Version 2.0.4
mxODBC Connect is our commercially supported client-server product f
Chris Angelico writes:
> On Wed, Feb 12, 2014 at 7:57 PM, Jussi Piitulainen wrote:
> >> In Python, integers have arbitrary precision, but floats, Fractions,
> >> and Decimals, don't. Nearly any operation on arbitrarily large
> >> numbers will be either more accurate or more efficient (maybe both)
>
Roy Smith wrote:
It looks to me like he's trying to implement a classic Gang of Four
singleton pattern.
Which I've never really seen the point of in Python,
or any other language for that matter. Just create
one instance of the class during initialisation,
put it in a global somewhere, and use
Chris Angelico writes:
> On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney
> wrote:
> > So, if I understand you right, you want to say that you've not found
> > a computer that works with the *complete* set of real numbers. Yes?
>
> Correct. […] My point is that computers *do not* work with real
> nu
Gregory Ewing writes:
> Roy Smith wrote:
> > It looks to me like he's trying to implement a classic Gang of Four
> > singleton pattern.
>
> Which I've never really seen the point of in Python, or any other
> language for that matter. Just create one instance of the class during
> initialisation,
On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney wrote:
> Chris Angelico writes:
>
>> On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney
>> wrote:
>> > So, if I understand you right, you want to say that you've not found
>> > a computer that works with the *complete* set of real numbers. Yes?
>>
>> Correct
On Saturday, 31 October 2009 23:43:45 UTC+8, Hans Georg Schaathun wrote:
> Does anyone know how to save two-tone images represented as
> numpy arrays? I handle grayscale images by converting to
> PIL Image objects (mode="L") and then use the PIL save method,
> but I cannot make this work with mod
The fascinating aspect of this FSR lies
in its mathematical absurdity.
jmf
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney
> wrote:
> > That's why I think you need to be clear that your point isn't
> > “computers don't work with real numbers”, but rather “computers work
> > only with a limited subset of real numbers”.
>
> Hmm, I'm not sure that my
On 2/12/14 5:55 AM, wxjmfa...@gmail.com wrote:
The fascinating aspect of this FSR lies
in its mathematical absurdity.
jmf
Stop.
--
Ned Batchelder, http://nedbatchelder.com
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 12, 2014 at 10:44 PM, Ben Finney wrote:
> Chris Angelico writes:
>
>> On Wed, Feb 12, 2014 at 9:07 PM, Ben Finney
>> wrote:
>> > That's why I think you need to be clear that your point isn't
>> > “computers don't work with real numbers”, but rather “computers work
>> > only with a l
Chris Angelico :
> Hmm, I'm not sure that my statement is false. If a computer can work
> with "real numbers", then I would expect it to be able to work with
> any real number. In C, I can declare an 'int' variable, which can hold
> the real number 4 - does that mean that that variable stores real
On Wed, Feb 12, 2014 at 11:48 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Hmm, I'm not sure that my statement is false. If a computer can work
>> with "real numbers", then I would expect it to be able to work with
>> any real number. In C, I can declare an 'int' variable, which can hold
>> t
On 12/02/2014 04:14, Gene Heskett wrote:
On Tuesday 11 February 2014 23:13:33 Roy Smith did opine:
In article ,
ngangsia akumbo wrote:
Please i have a silly question to ask.
How long did it take you to learn how to write programs?
I've been working on it for 40 years. I'll let you know
In article ,
Ben Finney wrote:
> Gregory Ewing writes:
>
> > Roy Smith wrote:
> > > It looks to me like he's trying to implement a classic Gang of Four
> > > singleton pattern.
> >
> > Which I've never really seen the point of in Python, or any other
> > language for that matter. Just create o
On Tue, Feb 11, 2014 at 7:21 PM, ngangsia akumbo wrote:
> Please i have a silly question to ask.
>
> How long did it take you to learn how to write programs?
My entire life.
I started in 1975 when I was 16 - taught myself BASIC and wrote a very
crude downhill skiing game. I had dial in access to
On 12/02/2014 07:49, wxjmfa...@gmail.com wrote:
Le mardi 11 février 2014 20:04:02 UTC+1, Mark Lawrence a écrit :
On 11/02/2014 18:53, wxjmfa...@gmail.com wrote:
Le lundi 10 février 2014 15:43:08 UTC+1, Tim Chase a écrit :
On 2014-02-10 06:07, wxjmfa...@gmail.com wrote:
Python does no
Chris Angelico :
> On Wed, Feb 12, 2014 at 11:48 PM, Marko Rauhamaa wrote:
>> According to your definition, there's no computer in the world that can
>> work with integers or text files.
>
> Integers as far as RAM will allow, usually (which is the same caveat
> as is used when describing a progra
On Wednesday, February 12, 2014 3:37:04 PM UTC+5:30, Ben Finney wrote:
> Chris Angelico writes:
> > On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney wrote:
> > > So, if I understand you right, you want to say that you've not found
> > > a computer that works with the *complete* set of real numbers. Ye
In article ,
Larry Martell wrote:
> On Tue, Feb 11, 2014 at 7:21 PM, ngangsia akumbo wrote:
> > Please i have a silly question to ask.
> >
> > How long did it take you to learn how to write programs?
>
> My entire life.
>
> I started in 1975 when I was 16 - taught myself BASIC and wrote a ver
On Wednesday, February 12, 2014 7:34:42 PM UTC+5:30, Mark Lawrence wrote:
> I ask you, members of the jury, to find the accused, jmf, guilty of
> writing nonsense and deliberately using google groups to double line
> space. The evidence is directly above and quite clearly prooves, beyond
> a r
On 12/02/2014 14:14, Rustom Mody wrote:
On Wednesday, February 12, 2014 7:34:42 PM UTC+5:30, Mark Lawrence wrote:
I ask you, members of the jury, to find the accused, jmf, guilty of
writing nonsense and deliberately using google groups to double line
space. The evidence is directly above and q
On Wednesday, February 12, 2014 7:55:32 PM UTC+5:30, Mark Lawrence wrote:
> On 12/02/2014 14:14, Rustom Mody wrote:
> > On Wednesday, February 12, 2014 7:34:42 PM UTC+5:30, Mark Lawrence wrote:
> >> I ask you, members of the jury, to find the accused, jmf, guilty of
> >> writing nonsense and delibe
So I need to write a function based off of nCr, which I have here:
def choices(n, k):
if n == k:
return 1
if k == 1:
return n
if k == 0:
return 1
return choices(n - 1, k) + choices(n - 1, k - 1)
It works fine, but then I need to add in so that the user can
On 2014-02-12, Ben Finney wrote:
> Chris Angelico writes:
>
>> I have yet to find any computer that works with the set of real
>> numbers in any way. Never mind optimization, they simply cannot work
>> with real numbers.
>
> Not *any* computer? Not in *any* way? The Python built-in "float"
> type
On 2014-02-12, Ben Finney wrote:
>
>> In other contexts eg corporates, often the culture is the opposite:
>> top-posting with strictly NO trimming.
>
> I've never found a corporation that objects to the sensible
> conversation-style, minimal-quotes-for-context interleaved posting style.
I've alwa
Op woensdag 12 februari 2014 06:23:14 UTC+1 schreef Dave Angel:
> luke.gee...@gmail.com Wrote in message:
>
> > Can I make it that if
>
> > C = int(sys.argv[3])
>
> > But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
>
> >
>
>
>
> Why do you ask for 'automatically'?
On 12/02/2014 15:20, kjaku...@gmail.com wrote:
So I need to write a function based off of nCr, which I have here:
def choices(n, k):
if n == k:
return 1
if k == 1:
return n
if k == 0:
return 1
return choices(n - 1, k) + choices(n - 1, k - 1)
It wor
On 12/02/2014 15:32, luke.gee...@gmail.com wrote:
Op woensdag 12 februari 2014 06:23:14 UTC+1 schreef Dave Angel:
luke.gee...@gmail.com Wrote in message:
Can I make it that if
C = int(sys.argv[3])
But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
Why do you
def choices(n, k):
if k == 1:
return n
if n == k:
return 1
if k == 0:
return 1
return choices(n - 1, k) + choices(n - 1, k - 1)
print ("Total number of ways of choosing %d out of %d courses: " % (n, k))
n = int(input("Number of courses you like: "))
k =
luke.gee...@gmail.com writes:
> Can I make it that if
> C = int(sys.argv[3])
> But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
C = int(sys.argv[3]) if len(sys.argv) > 3 else 0
is one possibility.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Y
On Feb 12, 2014 11:00 AM, wrote:
>
> def choices(n, k):
> if k == 1:
> return n
> if n == k:
> return 1
> if k == 0:
> return 1
> return choices(n - 1, k) + choices(n - 1, k - 1)
Following line never runs
> print ("Total number of ways of choosing %d o
"Grant Edwards" wrote:
Not *any* computer? Not in *any* way? The Python built-in "float"
type "works with the set of real numbers", in a way.
The only people who think that are people who don't actualy _use_
floating point types on computers.
FPU parsing the IEEE spec, or?. I didn't quite pa
On Wednesday, February 12, 2014 7:56:05 AM UTC-8, kjak...@gmail.com wrote:
[snip]
> choices(n, k)
>
> Changed it like you said, didn't work
What are you doing with the value returned by the function, choices()? Right
now, you aren't doing anything with it. You are throwing it away. That's the
I've realised that the best way to do this is to use a web browser for
the graphical front end: high end graphics are simply not a necessity
here, so one does not need to leave the confines of the browser. Thus
we need a simple server script.
I'm still minimalist, so I guess we want xmlrpc an
On Wed, Feb 12, 2014 at 9:13 AM, Roy Smith wrote:
> In article ,
> Larry Martell wrote:
>
>> On Tue, Feb 11, 2014 at 7:21 PM, ngangsia akumbo wrote:
>> > Please i have a silly question to ask.
>> >
>> > How long did it take you to learn how to write programs?
>>
>> My entire life.
>>
>> I start
On 12/02/2014 15:56, kjaku...@gmail.com wrote:
def choices(n, k):
if k == 1:
return n
if n == k:
return 1
if k == 0:
return 1
return choices(n - 1, k) + choices(n - 1, k - 1)
print ("Total number of ways of choosing %d out of %d courses: " % (n,
On 12/02/2014 16:40, John Allsup wrote:
I've realised that the best way to do this is to use a web browser for
the graphical front end: high end graphics are simply not a necessity
here, so one does not need to leave the confines of the browser. Thus
we need a simple server script.
I'm still mi
Hi,
Current software development methods make things way more complex than
they need to be. I am trying to get an idea for how simple things can
be from final product down to low level implementation, hoping to
recover the code density miracles that the old school Forthers turned
out ages ago.
Hi,
I'm trying to figure out where 'simpler' stops and 'too simplistic'
begins. That's what I call 'absolute simplicity'. It is a necessity in
some areas of learning where even a jot of inefficiency can be costly
(consider a superconducting magnet just below the critical frequency
with massive
John Allsup writes:
> Hi,
(John, please don't top-post. Instead, retain only the quoted material
you're responding to, and interleave your responses after the points
like a conversation.
See https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.)
> I'm trying to figure out where 'simp
Op woensdag 12 februari 2014 17:10:36 UTC+1 schreef Alain Ketterlin:
> luke.gee...@gmail.com writes:
>
>
>
> > Can I make it that if
>
> > C = int(sys.argv[3])
>
> > But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
>
>
>
> C = int(sys.argv[3]) if len(sys.argv) > 3 e
On Thu, Feb 13, 2014 at 1:13 AM, Marko Rauhamaa wrote:
> Text files suffer from the same caveat as integers: there's a limit to
> how much you can store on the physical computer.
Sure, but nobody said the text file had to be _stored_ anywhere :)
Computers are quite capable of working with streams
On Wednesday, February 12, 2014 7:48:51 AM UTC+2, Dave Angel wrote:
>
> Perhaps if you would state your actual goal, we could judge
> whether this code is an effective way to accomplish
> it.
> DaveA
Thanks!
There is no specific goal, i am in process of building pattern knowledge
in python b
On Thu, Feb 13, 2014 at 2:17 AM, Grant Edwards wrote:
> On 2014-02-12, Ben Finney wrote:
>>
>>> In other contexts eg corporates, often the culture is the opposite:
>>> top-posting with strictly NO trimming.
>>
>> I've never found a corporation that objects to the sensible
>> conversation-style, m
There is another one.
Once object passes through singletonizator
there wont be any other object than first one.
Then object constructor can freely be used in every place
of code.
Curious if there could be any impact and applicability
of this to builtin types.
p.s. learned today that object
On 02/12/2014 09:40 AM, John Allsup wrote:
> I've realised that the best way to do this is to use a web browser for
> the graphical front end: high end graphics are simply not a necessity
> here, so one does not need to leave the confines of the browser. Thus
> we need a simple server script.
mistake, object constructor - to class constructor
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 13, 2014 at 4:57 AM, Michael Torrie wrote:
> It's unclear of what you are really trying to do, though. Doing as you
> propose to have a python server communicating with a web front-end is
> going to be a lot harder than you think. ...
> Some kind of CGI system. Or roll your own with T
kjaku...@gmail.com Wrote in message:
> def choices(n, k):
> if k == 1:
> return n
> if n == k:
> return 1
> if k == 0:
> return 1
> return choices(n - 1, k) + choices(n - 1, k - 1)
> print ("Total number of ways of choosing %d out of %d courses: " % (n,
On 2014-02-11, Dave Angel wrote:
> Mark Lawrence Wrote in message:
>> No matter what I try I can't get the subcommands in lower-case
>> when I have caps lock on, is there a simple work-around for
>> this as well? :)
>
> You could do what I've done for my own DOS, Windows, and Linux
> computers
luke.gee...@gmail.com Wrote in message:
>
Deleting all the obnoxious doublespaced googlegroups nonsense. ..
>
> then i keep getting IndexError: list index out of range
> anyway to prevent it and just set the value to 0?
>
My car makes a funny noise. What kind of
coat should I wear to
the da
Dave Angel writes:
> Mark Lawrence Wrote in message:
>>
>>
>> No matter what I try I can't get the subcommands in lower-case when I
>> have caps lock on, is there a simple work-around for this as well? :)
>>
>
> You could do what I've done for my own DOS, Windows, and Linux
> computers for ye
On 12/02/2014 17:50, Asaf Las wrote:
On Wednesday, February 12, 2014 7:48:51 AM UTC+2, Dave Angel wrote:
Perhaps if you would state your actual goal, we could judge
whether this code is an effective way to accomplish
it.
DaveA
Thanks!
There is no specific goal, i am in process of buildi
http://postimg.org/image/rkm9lhj8n/
So, I was doing some cx freeze stuff. If you cant understand everything from
the pic, I'll give extra info. Please help me.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 12, 2014 at 12:43 PM, wrote:
> http://postimg.org/image/rkm9lhj8n/
>
> So, I was doing some cx freeze stuff. If you cant understand everything from
> the pic, I'll give extra info. Please help me.
It would be preferable if you would please copy and paste the
exception along with the
I do this:
a = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
b = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
print
print id(a)
print id(b)
And get this:
True
140329184721376
140329184721376
This works for longer strings. Does python
compare a new string to every other string
I've made in o
I think of it as a bit strange. Should I report it as a bug? I was trying to
incorporate a save/load, and this happened.
def save():
target = open ("save.swroc", 'w')
target.write([counter, loop, number_of_competitors, competitors])
def load():
target = open("save.
On 02/12/2014 12:17 PM, Tobiah wrote:
I do this:
a = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
b = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
print
print id(a)
print id(b)
And get this:
True
140329184721376
140329184721376
This works for longer strings. Does python
compare a new stri
On Thu, Feb 13, 2014 at 7:17 AM, Tobiah wrote:
> This works for longer strings. Does python
> compare a new string to every other string
> I've made in order to determine whether it
> needs to create a new object?
No, it doesn't; but when you compile a module (including a simple
script like that
On 12/02/2014 20:21, eneskri...@gmail.com wrote:
I think of it as a bit strange. Should I report it as a bug? I was trying to
incorporate a save/load, and this happened.
def save():
target = open ("save.swroc", 'w')
target.write([counter, loop, number_of_competitors, compe
One to write in the file, and one to read it.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 12, 2014 at 7:11 AM, Rustom Mody wrote:
> On Wednesday, February 12, 2014 3:37:04 PM UTC+5:30, Ben Finney wrote:
>> Chris Angelico writes:
>
>> > On Wed, Feb 12, 2014 at 7:56 PM, Ben Finney wrote:
>> > > So, if I understand you right, you want to say that you've not found
>> > > a com
On 12/02/2014 20:43, eneskri...@gmail.com wrote:
One to write in the file, and one to read it.
Nice to know, but please place this in context. Many people who partake
in this group are smart, but we're not mind readers :)
--
My fellow Pythonistas, ask not what our language can do for you,
I am sorry then. So what's the problem, and if it is a bug, should I report it?
--
https://mail.python.org/mailman/listinfo/python-list
On 13 February 2014 00:55, Larry Martell wrote:
> On Tue, Feb 11, 2014 at 7:21 PM, ngangsia akumbo
> wrote:
> > Please i have a silly question to ask.
> >
> > How long did it take you to learn how to write programs?
>
> My entire life.
>
> I started in 1975 when I was 16 - taught myself BASIC an
[32-bit Windows XP-SP2]
On Tue, 11 Feb 2014 12:11:49 -0500, Terry Reedy wrote:
> [problems installing rc1]
>
> On 2/11/2014 10:42 AM, Duncan Booth wrote:
>
> > Does it put any useful messages in logfile.txt?
>
> 'error' occurs on 40. most are like the following
>
> MSI (s) (40:08) [11:57:25:973
On 02/12/2014 12:17 PM, Tobiah wrote:
I do this:
a = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
b = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
print
print id(a)
print id(b)
And get this:
True
140329184721376
140329184721376
This works for longer strings. Does python
compare a new stri
On 13 February 2014 02:17, Grant Edwards wrote:
> On 2014-02-12, Ben Finney wrote:
> >
> >> In other contexts eg corporates, often the culture is the opposite:
> >> top-posting with strictly NO trimming.
> >
> > I've never found a corporation that objects to the sensible
> > conversation-style,
On Thu, Feb 13, 2014 at 7:59 AM, wrote:
> I am sorry then. So what's the problem, and if it is a bug, should I report
> it?
As Mark said, we need a bit of context in your emails. This on its own
carries no information.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 13, 2014 at 8:07 AM, Tim Delaney
wrote:
> On 13 February 2014 02:17, Grant Edwards wrote:
>> I've always worked in corporations where the email "culture" is the
>> Microsoft-induced "lazy and stupid" style as you describe. And yet
>> when I respond with editted quotes and interleaved
On 12/02/2014 20:59, eneskri...@gmail.com wrote:
I am sorry then. So what's the problem, and if it is a bug, should I report it?
Report what, you keep sending us one liners with no context?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our langua
On Thu, Feb 13, 2014 at 8:18 AM, Nir wrote:
> class FileInfo(UserDict):
> def __init__(self, filename=None):
> UserDict.__init__(self)
> self["name"] = filename
>
> I get a TypeError: 'FileInfo' object doesn't support item assignment .
>
> Am I missing somet
This is from the book 'dive into python'. I am trying to define jeez as being
an instance of FileInfo.
class UserDict(object):
def __init__(self, dict = None):
self.data = {}
if dict is not None: self.update(dict)
class FileInfo(UserDict):
def __in
On Thu, Feb 13, 2014 at 8:02 AM, Tim Delaney
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) for Christmas of 1985 (I think - I would have been 11
> years old). As you
On Wed, Feb 12, 2014 at 1:21 PM, wrote:
> I think of it as a bit strange. Should I report it as a bug? I was trying to
> incorporate a save/load, and this happened.
> def save():
> target = open ("save.swroc", 'w')
> target.write([counter, loop, number_of_competitors, competi
On 2/12/14 12:50 PM, Asaf Las wrote:
On Wednesday, February 12, 2014 7:48:51 AM UTC+2, Dave Angel wrote:
Perhaps if you would state your actual goal, we could judge
whether this code is an effective way to accomplish
it.
DaveA
Thanks!
There is no specific goal, i am in process of buildi
Nir Wrote in message:
> This is from the book 'dive into python'. I am trying to define jeez as being
> an instance of FileInfo.
>
> class UserDict(object):
> def __init__(self, dict = None):
> self.data = {}
> if dict is not None: self.update(dict)
>
> class
On 02/12/2014 01:21 PM, eneskri...@gmail.com wrote:
> I think of it as a bit strange. Should I report it as a bug? I was
trying to incorporate a save/load, and this happened.
What happened? I'm not seeing any exception information. I do see code
that doesn't quite make sense.
> def save():
Those two classes are from this code here(pasted below). Quite frankly, I don't
understand this code.
Also, UserDict is a built in module. I just typed it out so as to give
reference or any clue as to why I cant instantiate jeez.
On Thu, Feb 13, 2014 at 8:42 AM, Nir wrote:
> Also, UserDict is a built in module. I just typed it out so as to give
> reference or any clue as to why I cant instantiate jeez.
Recommendation for next time: Don't type it out, copy and paste it.
Show the actual code you ran, and the actual error m
Tobiah Wrote in message:
> On 02/12/2014 12:17 PM, Tobiah wrote:
>> I do this:
>>
>> a = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
>> b = 'lasdfjlasdjflaksdjfl;akjsdf;kljasdl;kfjasl'
>>
>> print
>> print id(a)
>> print id(b)
>>
>>
>> And get this:
>>
>> True
>> 140329184721376
>> 1403291847213
Asaf Las wrote:
There is another one.
Once object passes through singletonizator
there wont be any other object than first one.
Then object constructor can freely be used in every place
of code.
You're still making things far more complicated
than they need to be.
*Why* do you want to be a
On 02/11/2014 09:34 PM, Asaf Las wrote:
> playing a bit with subject.
>
> pros and cons of this approach? did i create bicycle again? :-)
I always thought sticking an object in a module is the simplest form of
singleton.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 12, 2014 at 4:42 PM, Nir wrote:
> If this makes sense to you, great. I am trying to break it down so that I can
> make sense of it. As you mentioned self["name"] = filename doesn't work
> unless I built a class to handle it. I guess my question then, is how is the
> class handling i
Ben Finney wrote:
That's why I think you need to be clear that your point isn't “computers
don't work with real numbers”, but rather “computers work only with a
limited subset of real numbers”.
They actually work with a subset of *rational* numbers.
All floats representable by a computer are ra
1 - 100 of 149 matches
Mail list logo