Re: How to test if a module exists?

2010-11-10 Thread Mark Wooding
r0g writes: > You use your main address on USENET rather than a junk one!? Obfuscated or > not that's either brave or foolhardy! I use my real email address. I also have an aggressive spam filter. But I don't think that much of my comes from Usenet harvesters any more, to be honest. -- [mdw] -

Re: Am I The Only One Who Keeps Reading ?Numpy? as ?Numpty??

2010-11-10 Thread Mark Wooding
Lou Pecora writes: > Bigger question: How do you pronouce it? Rhymes with `grumpy'. -- [mdw] -- http://mail.python.org/mailman/listinfo/python-list

Re: subclassing str

2010-11-10 Thread Mark Wooding
Lawrence D'Oliveiro writes: > In message <[email protected]>, Mark Wooding > wrote: > > > One option is to implement a subclass which implements the additional > > protocol. > > This is why I think object orientation ruins

Re: Allowing comments after the line continuation backslash

2010-11-10 Thread Mark Wooding
Lawrence D'Oliveiro writes: > In message <[email protected]>, Mark Wooding > wrote: > > 2. The MainWindow class only has the `Window' attribute described in > > its definition. Apparently there are other attributes as well (t

Re: How to test if a module exists?

2010-11-10 Thread Mark Wooding
Lawrence D'Oliveiro writes: > I see that you published my unobfuscated e-mail address on USENET for all to > see. I obfuscated it for a reason, to keep the spammers away. I'm assuming > this was a momentary lapse of judgement, for which I expect an apology. > Otherwise, it becomes grounds for an

Re: How to test if a module exists?

2010-11-11 Thread Mark Wooding
r0g writes: > Really? I get a metric butt-ton of spam every day to this address. I'm sure I get sent a lot of spam (though I don't know for sure -- see below). But I don't think much of it comes from Usenet harvesters any more. > Right now it simply filtered by address straight into my recycle

Re: How to test if a module exists?

2010-11-11 Thread Mark Wooding
Lawrence D'Oliveiro writes: > In message , MRAB wrote: > > > ... the next one at 3 Nov 2010 22:40 "Re: Allowing comments after the line > > continuation backslash" and _all_ the subsequent ones arrived with an > > _unobfuscated_ email address. > > You mean from this one on >

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Tracubik writes: > >>> def change_integer(int_value): > ... int_value = 10 > ... > ... def change_list(list): > ... list[0] = 10 [...] > why the integer value doesn't change while the list value do? Because in the first case you changed a variable local to the function, and that v

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Terry Reedy writes: > On 11/13/2010 11:29 AM, Mark Wooding wrote: > > > Alas, Python is actually slightly confusing here, since the same > > notation `=' sometimes means assignment and sometimes means mutation. > > I disagree somewhat. An object is mutated by an inte

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Dave Angel writes: > No, an (=) assignment is always an assignment. No. In `foo[0] = bar' it's a method call in disguise. > It changes the item on the left hand side to refer to a new object. Not necessarily. It could do anything at all depending on the type of the recipient object. -- [m

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Arnaud Delobelle writes: > [email protected] (Mark Wooding) writes: > > > Assignment /never/ binds. There is syntactic confusion here too, > > since Python interprets a simple assignment in a function body -- in > > the absence of a declaration such as `globa

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Steven D'Aprano writes: > On Sat, 13 Nov 2010 20:01:42 +0000, Mark Wooding wrote: > > Some object types are primitive, provided by the runtime system; > > there are no `internal' variables to be assigned in these cases. > > You seem to be making up your own term

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Dennis Lee Bieber writes: > def swapFunc(a, b): > return b, a That's not what a `swap' function should do. > > Alas, Python is actually slightly confusing here, since the same > > notation `=' sometimes means assignment and sometimes means mutation. > > "=" means just one thing, a r

Re: strange behavor....

2010-11-13 Thread Mark Wooding
Steven D'Aprano writes: > On Sat, 13 Nov 2010 21:42:03 +0000, Mark Wooding wrote: > > > Dave Angel writes: > > > >> No, an (=) assignment is always an assignment. > > > > No. In `foo[0] = bar' it's a method call in disguise. > &g

Re: Error installing python on Windows

2017-03-19 Thread Mark Summerfield
Windows users (quite reasonably IMO) expect installs to "just work". If Python needs extra bits it should ask the user if it can go get them and if they say Yes it should do just that. (And this should actually work -- unlike maybe, the Python 3.5 Windows installer.) And as for searching Google

how to write add frequency in particular file by reading a csv file and then making a new file of multiple csv file by adding frequency

2017-06-24 Thread Mark Byrne
A problem (possibly the problem) is the lines which use the get function: count = frequency.get(word,0) Since the dictionary is empty at the start of the loop, the get function is passing a value of 0 to count and count1. The subsequent updates to the dictionary are applying a value of zero As a

Re: can you improve this text-only beginner copy program?

2025-08-28 Thread Mark Bourne
#x27;t intentional. I keep meaning to sign up to the mailing list in the meantime... -- Mark. -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: can you improve this text-only beginner copy program?

2025-08-28 Thread Mark Bourne
ot;2")` if that's really what you intend. Maybe type hints are considered a bit advanced for just starting out, it would seem a good idea to learn about type hints along with the rest of Python rather than something bolted on afterwards (even if "bolted on afterwards" is how they came into the Python language!) -- Mark. -- https://mail.python.org/mailman3//lists/python-list.python.org

using 3rd party dll in python - UsingTheVRTTDriver.zip (0/1)

2013-06-25 Thread Mark R Rivet
I would like to use the Gen3.dll functions from python. I understand that I can use ctypes to load the dll. I have been able to load the dll but cannot make any sense of how to use it once I have it loaded. I have been trying to understand the ctypes tutorial but I just can't wrap my head around it

simple client data base

2012-09-03 Thread Mark R Rivet
Hello all, I am learning to program in python. I have a need to make a program that can store, retrieve, add, and delete client data such as name, address, social, telephone number and similar information. This would be a small client database for my wife who has a home accounting business. I have

Re: simple client data base

2012-09-08 Thread Mark R Rivet
On Mon, 03 Sep 2012 16:50:14 +0200, Peter Otten <[email protected]> wrote: >Chris Angelico wrote: > >> You may also be needlessly reinventing the wheel. Aren't there already >> several million basic contact databases around? Why roll your own? > >To learn a thing or two, and to stick it to the defe

Re: simple client data base

2012-09-08 Thread Mark R Rivet
On Wed, 5 Sep 2012 05:57:24 -0700 (PDT), Ramchandra Apte wrote: >On Monday, 3 September 2012 19:42:21 UTC+5:30, Manatee wrote: >> Hello all, I am learning to program in python. I have a need to make a >> >> program that can store, retrieve, add, and delete client data such as >> >> name, addre

Re: simple client data base

2012-09-08 Thread Mark R Rivet
On Tue, 04 Sep 2012 04:25:14 +0200, Thomas 'PointedEars' Lahn wrote: >Mark R Rivet wrote: > >> Hello all, I am learning to program in python. I have a need to make a >> program that can store, retrieve, add, and delete client data such as >> name, address, so

Re: simple client data base

2012-09-08 Thread Mark R Rivet
On Thu, 6 Sep 2012 01:57:04 -0700 (PDT), Bryan wrote: >Mark R Rivet wrote: >> Hello all, I am learning to program in python. I have a need to make a >> program that can store, retrieve, add, and delete client data such as >> name, address, social, telephone number and simi

Simple Python question for some

2012-10-28 Thread Mark L. Hotz
I have what I think should be a relatively simple question for someone who is knowledgeable about Python. At the IDLE prompt, when I enter "b" > 99, it responds True. In fact, it doesn't matter which number is entered here, "b" is always greater (e.g. "b" > 1 == True; "b" > 10 == True, or "

Where is the most recent Tkinter information

2012-05-16 Thread Mark R Rivet
It seems like all the info on tkinter is around the 2000 time frame. Is tkinter still being developed/supported? -- http://mail.python.org/mailman/listinfo/python-list

Re: Are there any instrumentation widgets for wxpython or tkinter?

2012-05-16 Thread Mark R Rivet
On Sat, 12 May 2012 12:40:28 -0700 (PDT), Sverre wrote: >I searched for widgets used for PLC automation or lab instrumentation >like gauges, led's etc. in the net, but didn't found anything because >of those massive link spam sites. In the case there isn't any >solution, with which toolkit would

Python and Tkinter by John E Grayson

2012-05-16 Thread Mark R Rivet
I have a copy of this book and was wondering how relevant the content is considering the publish date is 2000. Are people still using this information? Anyone have any experience with this book? I guess what I mean, is, any of the code in this book deprecated? or does it still contain information

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Mark R Rivet
On 17 May 2012 09:53:40 GMT, Steven D'Aprano wrote: >On Wed, 16 May 2012 23:55:29 -0400, Mark R Rivet wrote: > >> I have a copy of this book and was wondering how relevant the content is >> considering the publish date is 2000. Are people still using this >>

what gui designer is everyone using

2012-06-05 Thread Mark R Rivet
I want a gui designer that writes the gui code for me. I don't want to write gui code. what is the gui designer that is most popular? I tried boa-constructor, and it works, but I am concerned about how dated it seems to be with no updates in over six years. -- http://mail.python.org/mailman/listin

Python script produces "sem_trywait: Permission denied"

2005-10-18 Thread Mark E. Hamilton
se problems. However, if anyone does have a solution to it I'd like to see it. I hate having unresolved wierdnesses in our code. -- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, NM. 505-844-7666 -- http://mail.python.org/mailman/listinfo/python-list

Python script produces "sem_trywait: Permission denied"

2005-10-18 Thread Mark E. Hamilton
rmission denied We don't run these scripts as root, so I can't say whether they work as root. I suspect they would, though, since root has permissions to do anything. -- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, N

frozenset/subclassing/keyword args

2005-10-31 Thread Mark E. Fenner
is broken locally and on the python.org docs. Locally, it reads: file:///usr/share/doc/python-docs-2.4.2/html/lib/module-comparison-to-builtin-set.html While it should read: file:///usr/share/doc/python-docs-2.4.2/html/lib/comparison-to-builtin-set.html Regards, Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: frozenset/subclassing/keyword args

2005-11-01 Thread Mark E. Fenner
efficiency, conciseness, other concerns, etc. etc. Doesn't mean I can't gripe about it! As you said, there are a number of threads on this. Consulting those gave a quick three line solution, shown below. Regards, Mark P.S. Here's what I should have been doing: ***

RFC: Python bindings to Linux i2c-dev

2005-01-22 Thread Mark M. Hoffman
SMBus [3]. [1] http://members.dca.net/mhoffman/sensors/python/20050122/ [2] http://archives.andrew.net.au/lm-sensors/msg28792.html [3] http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/useful_addresses.html Thanks and regards, -- Mark M. Hoffman [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Memoization/Caching of Instance Methods

2005-03-24 Thread Mark E. Fenner
In the code below, the class DifferentCache utilizes three different memoization (caching) strategies. Neither the function Memoize1 or the class Memoize2 will be adequate for all three of these cases (I intend these to be used as, for example, getInstanceValueFunction = Memoize1(getInstanceValue

extend methods of decimal module

2014-02-19 Thread Mark H. Harris
Would it be possible to extend the methods of the decimal module just a bit to include atan(), sin(), cos(), and exp() ? The module has methods for ln() and sqrt(); and that's great! I have done some rudimentary searching of the pep history and I'm not finding any pep related to extending the d

Re: IDLE won't run after installing Python 3.3 in Windows

2014-02-19 Thread Mark H. Harris
> > Any suggestions? Thanks in advance! > > Switch to Gnu/Linux. Which version of tcl/tk is installed. I would guess that tkinter is honked up somehow... did you clear up the old tkinter stuff? -- https://mail.python.org/mailman/listinfo/python-list

Re: IDLE won't run after installing Python 3.3 in Windows

2014-02-19 Thread Mark H. Harris
> > The version of tcl/tk is completely irrelevant as it comes bundled in > > the Python msi installer. > Does the previous version put stuff into the registry that keeps the new version from running correctly? -- https://mail.python.org/mailman/listinfo/python-list

Re: extend methods of decimal module

2014-02-19 Thread Mark H. Harris
> > The decimal module implements IEEE 854 > Thanks Terry... ... long time. I would like to find out if there is some iron-clad policy about extending the implementation of an IEEE standard... decimal module in this case; I'm just thinking that this particular extension really fits the pyt

Re: IDLE won't run after installing Python 3.3 in Windows

2014-02-21 Thread Mark H. Harris
On Tuesday, February 18, 2014 8:56:51 AM UTC-6, [email protected] wrote: > Any suggestions? Thanks in advance! > Is there any possibility that you are bumping up against open IDLE Issue 14576? http://bugs.python.org/issue14576 -- https://mail.python.org/mailman/listinfo/python-list

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
> > Have you looked at the gmpy2 ( https://code.google.com/p/gmpy/ ) module? > > casevh No... was not aware of gmpy2... looks like a great project! I am wondering why it would be sooo much faster? I was hoping that Stefan Krah's C accelerator was using FFT fast fourier transforms for mul

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
On Wednesday, February 19, 2014 4:29:27 PM UTC-6, Oscar Benjamin wrote: > Actually the performance difference isn't as big as you might think. > > Oscar You're right. At least my own benchmark on my native exp() vs the built-in was about ~same ~same. I was hoping that Stefan had used FFT...

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
ideration. Oh, and one more thing... whoever is doing the work on IDLE these days, nice job! It is stable, reliable, and just works/ appreciate it! Kind regards, Mark H Harris -- https://mail.python.org/mailman/listinfo/python-list

posting code snippets

2014-02-27 Thread Mark H. Harris
hi folks, Its been too long... can't remember... are there rules here about posting code snippets, or length considerations, and so forth? Seems like there was a place to share code snips outside of the message area? A related question, is there a python repository for uploading p

Re: Can global variable be passed into Python function?

2014-02-27 Thread Mark H. Harris
On Friday, February 21, 2014 12:37:59 AM UTC-6, Sam wrote: > I need to pass a global variable into a python function. However, the global > variable does not seem to be assigned after the function ends. Is it because > parameters are not passed by reference? How can I get function parameters to

Re: posting code snippets

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 9:01:50 AM UTC-6, Jerry Hill wrote: > -- > > Jerry Thanks guys, perfect. 'preciate it! -- https://mail.python.org/mailman/listinfo/python-list

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 8:42:55 AM UTC-6, Oscar Benjamin wrote: > > Some points: Thanks so much... you have clarified some things I was struggling with... > 1) Why have you committed the code as a .tar.gz file? um, to save space... well, I know its tiny, but its just a habit I ha

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 10:24:23 AM UTC-6, Oscar Benjamin wrote: from decimal import Decimal as D > >>> D(0.1) > Decimal('0.155511151231257827021181583404541015625') > hi Oscar, well, that's not what I'm doing with my D()... I'm not just making D() mimic Decimal.

Re: posting code snippets

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 4:15:16 PM UTC-6, Ben Finney wrote: > > Post your code in-line with your message. This is for the sake of the > people whose time you're requesting, and of later readers who will find > the thread when searching the archives -- URLs to snippets are likely to > be in

Re: Can global variable be passed into Python function?

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 11:54:44 AM UTC-6, Ned Batchelder wrote: > Mark, thanks for helping to answer the OP's question. We've covered (in > depth) in the rest of this thread, that Python *does* have the concept > of a variable, it just behaves differently than

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 5:50:55 PM UTC-6, Oscar Benjamin wrote: > . . . Calling Decimal on a float performs an exact binary to > decimal conversion. Your reasoning essentially assumes that every > float should be interpreted as an approximate representation for a > nearby decimal value.

Re: Can global variable be passed into Python function?

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 8:07:20 PM UTC-6, Steven D'Aprano wrote: > If they point to the same piece of memory -- which, by the way, can be > moved around if the garbage collector supports it -- then A is B cannot > possibly return False. > hi Steve, long time, yes, my whole point exac

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 9:15:36 PM UTC-6, Steven D'Aprano wrote: > Decimal uses base 10, so it is a better fit for numbers we > write out in base 10 like "0.12345", but otherwise it suffers from the > same sort of floating point rounding issues as floats do. > > > py> Decimal('1.2345'

Re: extend methods of decimal module

2014-02-27 Thread Mark H. Harris
On Thursday, February 27, 2014 10:26:59 PM UTC-6, Chris Angelico wrote: > Create Decimal values from strings, not from the str() of a float, > which first rounds in binary and then rounds in decimal. > Thanks Chris... another excellent point... ok, you guys have about convinced me (which is sp

Re: Can global variable be passed into Python function?

2014-02-27 Thread Mark H. Harris
ifically going for > introspection and such. Right. The only time I use "is" is when I'm trying to explain to someone new to python assignment what is happening inside... what Mark Summerfield calls "python's beautiful heart," in his his recent book,

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 9:50:09 AM UTC-6, Steven D'Aprano wrote: > > PS On the topic of enums, when are we getting support for a switch > > statement? > http://legacy.python.org/dev/peps/pep-3103/ > http://legacy.python.org/dev/peps/pep-0275/ > I have reviewed these peps, and I heard Guido

Re: extend methods of decimal module

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 8:41:49 AM UTC-6, Wolfgang Maier wrote: > Hi Mark, > > here is an enhancement for your epx function. > > Wolfgang hi Wolfgang, thanks much! As a matter of point in fact, I ran into this little snag and didn't understand it, because I was t

Re: extend methods of decimal module

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 2:54:12 AM UTC-6, Wolfgang Maier wrote: > Since by now, I guess, we all agree that using the string representation is > the wrong approach, you can simply use Decimal instead of D() throughout > your code. > Best, > Wolfgang hi Wolfgang, ...right... I'm going to

Re: extend methods of decimal module

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 9:11:49 AM UTC-6, Steven D'Aprano wrote: > >> Now that Python has a fast C implementation of Decimal, I would be > >> happy for Python 4000 to default to decimal floats, and require special > >> syntax for binary floats. Say, 0.1b if you want a binary float, and 0.1 >

Re: extend methods of decimal module

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 12:37:37 PM UTC-6, Chris Angelico wrote: > > Are you aware that IEEE 754 includes specs for decimal floats? :) > Yes. I am from back in the day... way back... so 754 1985 is what I have been referring to. IEEE 854 1987 and the generalized IEEE 754 2008 have

Re: extend methods of decimal module

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 1:34:27 AM UTC-6, Steven D'Aprano wrote: > Now that Python has a fast C implementation of Decimal, I would be happy > for Python 4000 to default to decimal floats, and require special syntax > for binary floats. Say, 0.1b if you want a binary float, and 0.1 for a >

Re: extend methods of decimal module

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 1:39:11 PM UTC-6, Mark H. Harris wrote: > On Friday, February 28, 2014 1:34:27 AM UTC-6, Steven D'Aprano wrote: > > > > > Now that Python has a fast C implementation of Decimal, I would be happy > > > for Python 4000 to defaul

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 1:20:52 PM UTC-6, Marko Rauhamaa wrote: > > Which do *you* find more readable? > Yep, my point exactly. nice illustration. -- https://mail.python.org/mailman/listinfo/python-list

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
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 < D(1)): a = __atan__(n) elif (n == D(1)): a = gpi/4 elif (n == D(-1)): a = -(gpi/4

Re: Tuples and immutability

2014-02-28 Thread Mark H. Harris
On Thursday, February 27, 2014 10:01:39 AM UTC-6, Eric Jacoboni wrote: > > ('spam', [10, 30, 20], 'eggs') > > I get a TypeError for an illegal operation, but this operation is still > > completed? hi Eric, others have answered your question specifically, but the issue (which is recurring) b

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 6:40:06 PM UTC-6, Ned Batchelder wrote: > > I don't understand: you show an if/elif chain that cannot be expressed > as a switch statement (because it uses < ), and then conclude that > Python needs a switch statement? That doesn't make any sense. > Forgive me.

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 7:10:49 PM UTC-6, Mark Lawrence wrote: > I think you're talking nonsense. I've been happily using dict dispatch > tables for years and, like Steven and presumably many others, find them > dead easy to read. Perhaps you should invest in a better

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 8:15:38 PM UTC-6, Ned Batchelder wrote: > Mark, if you are going to advocate for a feature, find a good use case, > this one is absurd. Where did the constants GT_1 etc, come from? Not at all. Think of the C switch block... if you read about it in the

Re: Tuples and immutability

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 7:27:17 PM UTC-6, Eric Jacoboni wrote: > I agree with that too... My error was to first consider the list, then > the tuple... I should have considered the tuple first... > Anyway, the TypeError should rollback, not commit the mistake. I believe so too, but I'm not o

Re: Can global variable be passed into Python function?

2014-02-28 Thread Mark H. Harris
On Friday, February 28, 2014 8:01:45 PM UTC-6, Chris Angelico wrote: > > Does your switch construct have to handle the magic of GT_1 meaning "> > 1", or do you first figure out where it falls with an if/elif tree? > ChrisA hi Chris, yeah... well think again of the switch block in C... the

Re: Tuples and immutability

2014-02-28 Thread Mark H. Harris
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 when returning > multiple objects from

Re: Tuples and immutability

2014-02-28 Thread Mark H. Harris
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 problem... its a "cake" and "eat it too

Re: Tuples and immutability

2014-02-28 Thread Mark H. Harris
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. I was going to bed, and then thought of the solution. Allow th

Re: Tuples and immutability

2014-03-01 Thread Mark H. Harris
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

Re: Tuples and immutability

2014-03-01 Thread Mark H. Harris
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

Re: Can global variable be passed into Python function?

2014-03-01 Thread Mark H. Harris
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

Re: Can global variable be passed into Python function?

2014-03-01 Thread Mark H. Harris
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

Re: Mac vs. Linux for Python Development

2014-03-01 Thread Mark H. Harris
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

Re: Can global variable be passed into Python function?

2014-03-01 Thread Mark H. Harris
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

Re: Can global variable be passed into Python function?

2014-03-01 Thread Mark H. Harris
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

Re: extend methods of decimal module

2014-03-01 Thread Mark H. Harris
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

Re: Tuples and immutability

2014-03-01 Thread Mark H. Harris
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] >

Re: Tuples and immutability

2014-03-01 Thread Mark H. Harris
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

python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
hi folks, Python Decimal Library dmath.py v0.3 Released https://code.google.com/p/pythondecimallibrary/ This code provides the C accelerated decimal module with scientific/transcendental functions for arbitrary precision. I have also included pilib.py which is a PI library of historic algorith

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 5:34:30 AM UTC-6, Mark H. Harris wrote: > hi folks, Terry, I posted this mod as an idea on python-ideas, as you suggested. Also, I made the additional suggestion that decimal floating point be considered as the primary floating point type for python4.x, with

Re: Reference

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 3:42:30 AM UTC-6, ast wrote: > Consider following code: > > >>> A=7 > >>> B=7 > >>> A is B > True The names A and B are both bound to the same object (7). You will discover that this is True for all small ints less than 257; on CPython3.3.4. I just checked it. :) I

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 7:34:40 AM UTC-6, Oscar Benjamin wrote: > Python Decimal Library dmathlib.py v0.3 Released > https://code.google.com/p/pythondecimallibrary/ > Is this available on PyPI? It seems there already is a "dmath" package > on PyPI that was written by someone else some time ago

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 7:34:40 AM UTC-6, Oscar Benjamin wrote: > On 3 March 2014 11:34, Mark H. Harris wrote: > > Is this available on PyPI? It seems there already is a "dmath" package > on PyPI that was written by someone else some time ago so you might > nee

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 10:44:16 AM UTC-6, Oscar Benjamin wrote: > Is it on PyPI though? I was referring to a PyPI name so that people > could install it with "pip install pdeclib" > Oscar hi Oscar, I'm sorry, I completely missed the point of your question. No its not on PyPI, but I don't mind

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 11:23:13 AM UTC-6, Wolfgang Maier wrote: > def fact(x): > """ fact(x)factorial{x} int x > 0 > > return +Decimal(math.factorial(x)) > to make it return a Decimal rounded to context precision? hi Wolfgang, I'm not sure. We're doing some things wit

pip and distutils2-1.0a4

2014-03-03 Thread Mark H. Harris
hi folks, I am having a fit with pip this afternoon. I finally got pip installed on this system from a binary blob (what nightmare, talk about 1987). Anyway, pip is installed, but when I go to PyPI to pull down distutils is gives a message that no such package exists. I feel like Obeewan; "i

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 2:03:19 PM UTC-6, Mark H. Harris wrote: > On Monday, March 3, 2014 11:23:13 AM UTC-6, Wolfgang Maier wrote: Wolfgang, answer is not so much, in fact, not at all. But it is an interesting question for me; where I am continuing to learn the limits of Decimal, and

Re: pip and distutils2-1.0a4

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 2:53:00 PM UTC-6, Mark Lawrence wrote: > distutils has been part of the standard library for years. hi Mark, that's fabulous, why can't I import it? Because I'm doing something wrong of course. :) marcus -- https://mail.python.org/mailman/listinfo/python-list

Re: pip and distutils2-1.0a4

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 3:32:43 PM UTC-6, Robert Kern wrote: > Probably. If you want us to help, you need to show us what you tried, tell us > what results you expected, and copy-paste the output that you got. > Robert Kern hi Robert, well, I finally came up with trying to find setup(). Its

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 3:18:37 PM UTC-6, Mark H. Harris wrote: Yeah, you can set Emin & Emax enormously large (or small), can set off overflow, and set clamping. I am needing a small utility (tk?) that will allow the context to be set manually by the interactive user dynamically (f

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 4:15:39 PM UTC-6, Wolfgang Maier wrote: > Well, that may be your use-case, but then math.factorial is for you. > On the other hand, you may be interested in getting > context-rounded factorials and rounding to context > precision is what you'd expect from a Decimal func

Re: pip and distutils2-1.0a4

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 4:11:44 PM UTC-6, Robert Kern wrote: >http://docs.python.org/3/distutils/index.html > Robert Kern hi Robert, I'm not whining --really-- but there is so dang much doc out there on how to upload a package to PyPI with every tool under the sun and all of them fancier t

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 4:44:27 PM UTC-6, Wolfgang Maier wrote: > decimal can handle BIGNUMS fairly well, you just need to increase context > Emax. Have you ever tried to calculate stuff with ints as big as MAX_EMAX > (10**99) or even close to it and still had a responsive > sy

Re: python decimal library dmath.py v0.3 released

2014-03-03 Thread Mark H. Harris
On Monday, March 3, 2014 5:34:30 AM UTC-6, Mark H. Harris wrote: > https://code.google.com/p/pythondecimallibrary/ I released my pdeclib module this afternoon on PyPI here: https://pypi.python.org/pypi/pdeclib/0.3 The tarball.gz may be downloaded and installed with: pip inst

<    50   51   52   53   54   55   56   57   58   59   >