"jeffhg582003" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> fields. I am trying to capture the number generated from the insert
but
> I am not exactly sure how to do that after an insert.
Other folks have pointed you to "select @@identity" but I thought I
should mention that if you u
Buy high quality TAG Heuer Tiger Woods Golf Watches at low price, you can
not believe, but it is true.
There are two models on
http://www.luxuryowner.net/Replica-TAG-Heuer-Tiger-Woods-Golf-Watches.html
White: Tag Heuer Tiger Woods Golf White Mens Watch WAE1112.FT6008:
http://www.luxuryowner.net
On May 6, 2013 10:39 AM, "Joshua Landau" wrote:
>
> On 4 May 2013 00:42, Ian Kelly wrote:
>>
>> The other thing that is suspicious about the code you posted is that
>> it has two different notions of the ball's position that are not
>> necessarily in
On Wed, May 8, 2013 at 2:37 PM, John Downs wrote:
> On Wed, May 8, 2013 at 4:20 PM, Roy Smith wrote:
>>
>> FooEntry is a class. How would you describe a list of these in a
>> docstring?
>>
>> "A list of FooEntries"
>>
>> "A list of FooEntrys"
>>
>> "A list of FooEntry's"
>>
>> "A list of FooEntr
On Wed, May 8, 2013 at 8:35 PM, Mark Janssen wrote:
> Okay, to anyone who might be listening, I found the core of the problem.
What "problem" are you referring to? You've been posting on this
topic for going on two months now, and I still have no idea of what
the point of it all is. I recall so
On Thu, May 9, 2013 at 3:51 PM, Mark Janssen wrote:
> On Thu, May 9, 2013 at 10:33 AM, Ian Kelly wrote:
>> On Wed, May 8, 2013 at 8:35 PM, Mark Janssen
>> wrote:
>>> Okay, to anyone who might be listening, I found the core of the problem.
>>
>> What "pr
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe wrote:
> I seem to stumble upon a situation where "!=" operator misbehaves in
> python2.x. Not sure if it's my misunderstanding or a bug in python
> implementation. Here's a demo code to reproduce the behavior -
The != operator is implemented by the __ne__
On Mon, May 13, 2013 at 5:27 PM, Andrew Berg wrote:
> On 2013.05.13 17:53, Mark Lawrence wrote:
>> I much prefer the alternative <> for != but some silly people insisted
>> that this be removed from Python3.
> It's not removed from Python 3, though:
>
> Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 20
On Sun, May 12, 2013 at 10:48 PM, Mark Janssen
wrote:
> You're very right. But that is what has made it sort of a test-bed
> for internet collaboration. The project I'm working on is aimed to
> solve that problem and take the Wiki philosophy to its next or even
> ultimate level. By adding a "n
On Mon, May 13, 2013 at 9:41 AM, Sharon COUKA wrote:
> Hello, I'm new to python and i have to make a Mandelbrot fractal image for
> school but I don't know how to zoom in my image.
> Thank you for helping me.
Is this a GUI application or does it just write the image to a file?
What GUI / image l
On Wed, May 15, 2013 at 6:16 AM, Oscar Benjamin
wrote:
> I don't generally use super() but I did see some advice about it in
> this article:
> https://fuhm.net/super-harmful/
>
> From the conclusion:
> "Never use positional arguments in __init__ or __new__. Always use
> keyword args, and always ca
On Wed, May 15, 2013 at 10:56 AM, Andrew Bradley wrote:
> Hello everyone.
>
> I am having a good time programming with Python 3.3 and Pygame. Pygame seems
> like the perfect platform for the kind of simple games that I want to make.
>
> What I have currently programmed is basically a drawn rectang
On Wed, May 15, 2013 at 8:06 PM, Steven D'Aprano
wrote:
> On Wed, 15 May 2013 13:16:09 +0100, Oscar Benjamin wrote:
>
>
>> I don't generally use super()
>
> Then you should, especially in Python 3.
>
> If you're not using super in single-inheritance classes, then you're
> merely making your own co
On Thu, May 16, 2013 at 5:04 AM, Sharon COUKA wrote:
> I have to write the script, and i have one but the zoom does not work
That doesn't answer my question. Perhaps if you would share with us
what you already have, then we could point out what you need to do and
where to get your "zoom" working
On Thu, May 16, 2013 at 10:55 AM, Sharon COUKA wrote:
> # Register events
> c.bind('i', zoom)
> c.bind('i', unzoom)
> c.bind('i', mouseMove)
I'm not an expert at Tkinter so maybe one of the other residents can
help you better with that. The code above looks wrong to me, though.
As far as I know,
On Thu, May 23, 2013 at 12:52 PM, Matthew Gilson wrote:
> Using Cpython, we can do the following:
>
> def func(**kwargs):
> print kwargs
>
> d = {'foo bar baz':3}
>
> So that might lead us to believe that the keys of the mapping do not need to
> be valid identifiers. However,
On Sun, May 26, 2013 at 12:13 PM, Peter Brooks
wrote:
> No, on a multi-core machine it's normal. The machine shows python
> running multiple threads - and the number of threads change as the
> program runs. Perhaps the OS/X implementation of python does allow
> concurrency when others don't. It ce
On Sun, May 26, 2013 at 10:36 PM, Peter Brooks
wrote:
> This makes complete sense - any atomic action should be atomic, so two
> threads can't be doing it at the same time. They can be doing anything
> else though.
>
> If two threads create a new object at the same time, for example,
> there's pot
On Sun, May 26, 2013 at 4:16 PM, Chris Angelico wrote:
> On Mon, May 27, 2013 at 5:35 AM, Ian Kelly wrote:
>> I'm pretty sure that CPython uses the GIL regardless of platform. And
>> yes you can have multiple OS-level threads, but because of the GIL
>> only one wil
On Mon, May 27, 2013 at 12:19 AM, Ian Kelly wrote:
> 7) Since the program being tested does basically nothing except start
> and exit threads, the extra 40% probably represents the overhead of
> all that starting and stopping, which would be done outside the GIL.
To test this, I trie
On Tue, May 28, 2013 at 12:25 PM, Matt Graves wrote:
> I receive this error while toying around with Functions...
>
> def pulldata(speclist,speccolumn):
> with open('profiles.csv', 'r') as f:
> reader = csv.reader(f)
> for column in reader:
> (specl
On Tue, May 28, 2013 at 12:41 PM, Ian Kelly wrote:
> On Tue, May 28, 2013 at 12:25 PM, Matt Graves wrote:
>> I receive this error while toying around with Functions...
>>
>> def pulldata(speclist,speccolumn):
>> with open('profiles.csv', 'r'
On Wed, May 29, 2013 at 8:33 AM, rusi wrote:
> 0.0 == 0.0 implies 5.4 == 5.4
> is not a true statement is what (I think) Steven is saying.
> 0 (or if you prefer 0.0) is special and is treated specially.
It has nothing to do with 0 being special. A floating point number
will always equal itself (
On Wed, May 29, 2013 at 11:46 AM, Croepha wrote:
> Is there anything like this in the standard library?
>
> class AnyFactory(object):
> def __init__(self, anything):
> self.product = anything
> def __call__(self):
> return self.product
> def __repr__(self):
> return "%s.%s(%r)" % (self.__class__._
On Wed, May 29, 2013 at 12:19 PM, Fábio Santos wrote:
> Are you sure you don't want to use a lambda expression? They are pretty
> pythonic.
>
> none_factory = lambda: None
> defaultdict_none_factory = lambda: defaultdict(none_factory)
>
> collections.defaultdict(defaultdict_none_factory)
Gah. If
On Wed, May 29, 2013 at 12:33 PM, alcyon wrote:
> This notation displays hex values except when they are 'printable', in which
> case it displays that printable character. How do I get it to force hex for
> all bytes? Thanks, Steve
Is this what you want?
>>> ''.join('%02x' % x for x in b'hel
On Wed, May 29, 2013 at 8:49 PM, rusi wrote:
> On May 30, 6:14 am, Ma Xiaojun wrote:
>> What interest me is a one liner:
>> print '\n'.join(['\t'.join(['%d*%d=%d' % (j,i,i*j) for i in
>> range(1,10)]) for j in range(1,10)])
>
> Ha,Ha! The join method is one of the (for me) ugly features of python
On Thu, May 30, 2013 at 12:26 PM, Mok-Kong Shen
wrote:
> Am 27.05.2013 17:30, schrieb Ned Batchelder:
>>
>> On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
>>>
>>> From an int one can use to_bytes to get its individual bytes,
>>> but how can one reconstruct the int from the sequence of bytes?
>>>
>> T
On Thu, May 30, 2013 at 12:44 PM, Chris Angelico wrote:
> On Fri, May 31, 2013 at 4:36 AM, Ian Kelly wrote:
>> I don't object to changing the join method (one of the more
>> shoe-horned string methods) back into a function, but to my eyes
>> you've got the ar
On Thu, May 30, 2013 at 1:30 PM, Neil Cerutti wrote:
> On 2013-05-30, Chris Angelico wrote:
>> On Thu, May 30, 2013 at 3:10 PM, Steven D'Aprano
>> wrote:
>>> # Wrong, don't do this!
>>> x = 0.1
>>> while x != 17.3:
>>> print(x)
>>> x += 0.1
>>
>> Actually, I wouldn't do that with integers
On Thu, May 30, 2013 at 1:38 PM, MRAB wrote:
> And additional argument (pun not intended) for putting sep second is
> that you can give it a default value:
>
>def join(iterable, sep=""): return sep.join(iterable)
One argument against the default is that it is specific to the str
type. If you
On Fri, May 31, 2013 at 4:16 AM, Fábio Santos wrote:
> On Fri, May 31, 2013 at 10:08 AM, Alister wrote:
>> I think that is the winning argument.
>> Next question is what should be the default ("", " " or',')?
>
> join, comma_join, whitejoin, linejoin variants, with different defaults?
The more s
On Fri, May 31, 2013 at 9:41 AM, Νικόλαος Κούρας wrote:
> Τη Παρασκευή, 31 Μαΐου 2013 6:37:06 μ.μ. UTC+3, ο χρήστης Fábio Santos έγραψε:
>
>> Check if python3 and python3.3 aren't the same. Run them and look at the
>> "intro" > lines.
>
> root@nikos [~]# python -V
> Python 2.6.6
> root@nikos [~]#
On Fri, May 31, 2013 at 11:10 AM, Νικόλαος Κούρας wrote:
> root@nikos [~]# ls -al /usr/bin/python*
> -rwxr-xr-x 3 root root 4864 Feb 22 02:00 /usr/bin/python*
> lrwxrwxrwx 1 root root6 Apr 5 20:34 /usr/bin/python2 -> python*
> -rwxr-xr-x 3 root root 4864 Feb 22 02:00 /usr/bin/python2.6*
> -rw
On Fri, May 31, 2013 at 11:16 AM, Νικόλαος Κούρας wrote:
> root@nikos [~]# which python
> /usr/bin/python
> root@nikos [~]# which python2
> /usr/bin/python2
> root@nikos [~]# which python3
> /root/.local/lib/python2.7/bin/python3
> root@nikos [~]# which python3.3
> /root/.local/lib/python2.7/bin/p
On Fri, May 31, 2013 at 11:42 AM, Νικόλαος Κούρας wrote:
> OMG i gave by mistake
>
> root@nikos [/]# rm -rf /root/.local/
>
> did i screwed up my remote VPS which i host 10 peoples webpages?
I don't know, is that where you were keeping the data?
The website still appears to be working, as best I
On Fri, May 31, 2013 at 5:30 PM, Νικόλαος Κούρας wrote:
> Indeed i have comiled python 2.7 and 3.3 form source after wget and
> ./configure an make install
>
> but i belive somehting is mixed up althouh python works ok.
>
> root@nikos [/opt/python3/bin]# ls -al
> ...
> root@nikos [/opt/python3/bi
On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails wrote:
> I'm actually with RR in terms of eliminating the overhead involved with
> 'dead' function calls, since there are instances when optimizing in Python
> is desirable. I actually recently adjusted one of my own scripts to
> eliminate branching an
On May 31, 2013 6:27 PM, "Chris Angelico" wrote:
> Yeah. I know that particular one because I have l aliased to ls -CF
> (aka --columns --classify), mainly because it came that way as a
> commented-out entry in my first Debian. Have since become quite
> accustomed to it; to me, 'l' means 'look' (I
On Tue, Jun 4, 2013 at 9:44 AM, Rick Johnson
wrote:
> It is my firm belief that truth testing a value that is not
> a Boolean should raise an exception. If you want to convert
> a type to Boolean then pass it to the bool function:
>
> lst = [1,2,3]
> if bool(lst):
> do_something
>
On Tue, Jun 4, 2013 at 6:38 PM, Carlos Nepomuceno
wrote:
> I don't have an opinion yet, but I've found contradictory evidence from many
> sources, such as:
>
> "A domain-specific language (DSL) is a type of programming language or
> specification language in software development and domain enginee
On Wed, Jun 5, 2013 at 10:25 PM, Russ P. wrote:
> I recall reading a few years ago that Guido was thinking about adding
> optional type annotations. I don't know if that went anywhere or not, but I
> thought it was a good idea. Eventually I got tired of waiting, and I realized
> that I just wan
On Fri, Jun 7, 2013 at 9:53 AM, wrote:
> I was planning on making a small 2D game in Python. Are there any libraries
> for this? I know of:
>
> • Pygame - As far as I know it's dead and has been for almost a year
> • PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
> •
On Fri, Jun 7, 2013 at 10:28 AM, Eam onn wrote:
> Do you know of any tutorial for PyGame? Preferably a video tutorial but any
> tutorial at all is fine! I can't seem to find any, even on pygame.org!!!
I'd start here: http://www.pygame.org/wiki/tutorials
--
http://mail.python.org/mailman/listinf
On Fri, Jun 7, 2013 at 10:35 AM, Ian Kelly wrote:
> On Fri, Jun 7, 2013 at 10:28 AM, Eam onn wrote:
>> Do you know of any tutorial for PyGame? Preferably a video tutorial but any
>> tutorial at all is fine! I can't seem to find any, even on pygame.org!!!
>
On Fri, Jun 7, 2013 at 11:53 AM, Eam onn wrote:
> Pygame isn't too good. You still need a lot of other libraries from what I
> understand(like for physics). Is there any alternative for 2D?
I don't know of any Python libraries that provide both a rendering
engine and a physics engine.
I'm not s
On Mon, Jun 10, 2013 at 7:57 AM, Rui Maciel wrote:
> # Case A: this works
> model.points[0].position = [2,3,4]
> line.points
>
> # Case B: this doesn't work
> test.model.points[0] = test.Point(5,4,7)
> line.points
>
>
>
> Is there a Python way of getting the same effect with Case B?
It's inform
On Tue, Jun 11, 2013 at 9:47 AM, Eam onn wrote:
> Is there a PyGame tutorial out there? I've seen TheNewBoston's tuts, but he
> didn't finish his. MetalX100 did a VERY good tutorial. I've been having
> trouble with some player movement because he isn't moving smoothly, he jumps.
> If I add 5 pi
On Tue, Jun 11, 2013 at 10:56 AM, Eam onn wrote:
> Also, is there a specific forum for PyGame or is here fine?
Go to pygame.org and click the link "Help (irc, lists)" in the
navigation menu. I could give you the direct link, but I want to
point out that this stuff is readily available on the pyg
On Tue, Jun 11, 2013 at 10:57 AM, Eam onn wrote:
> On Tuesday, June 11, 2013 5:31:22 PM UTC+1, Mark Lawrence wrote:
>> Try typing "pygame tutorial" into your favourite search and see what
>> comes back, you might be pleasantly surprised.
>
> Typed it in several times over the past 2 years and noth
On Sun, May 26, 2013 at 12:16 PM, Carlos Nepomuceno
wrote:
> list(range(13 * 4 * decks)) == range(13 * 4 * decks)
Not in Python 3.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, May 26, 2013 at 12:17 PM, RVic wrote:
> Ah, brilliant -- yes, this is so much more elegant in Python:
>
> #now cut the cards
> x = random.randrange(2,range(13 * 4 * decks))
> cards = cards[x:]+cards[:x]
Or if for some reason you want to do it in place:
cards[x:], cards[:x] = cards[:x], c
On Tue, Jun 4, 2013 at 3:49 PM, Chris Angelico wrote:
> So... can we cite http://xkcd.com/859/ in two threads at once, or does
> that create twice as much tension?
No, you just look at one of them upside-down, and then they cancel
each other out.
--
http://mail.python.org/mailman/listinfo/python
On Wed, Jun 12, 2013 at 4:06 PM, John Ladasky
wrote:
> On Wednesday, June 12, 2013 8:34:15 PM UTC, Chris Angelico wrote:
>>Unless you have a good reason for sticking with 2.x, go with 3.x.
>
> I agree, Chris, I will be teaching my son Python 3 from the start. In fact,
> I'm in the middle of a me
On Thu, Jun 13, 2013 at 1:41 PM, Joel Goldstick
wrote:
> there is a python module that reads and writes to excel files. look for
> that
More than one, actually, and which to use depends on whether "Excel
files" means the .xls or .xlsx format. On Windows, the most flexible
solution is going to b
On Fri, Jun 14, 2013 at 6:09 AM, rusi wrote:
> Since identifying a disease by the right name is key to finding a
> cure:
> Nikos is not trolling or spamming; he is help-vampiring.
I think he's a very dedicated troll elaborately disguised as a help
vampire. Remember that one of the names he previ
On Sat, Jun 15, 2013 at 10:05 PM, wrote:
> Yes I've read it. Very interesting read. There are other resources too online
> that make it very clear, for instance the wikipedia articles is pretty good.
>
> Though, if anyone would be interested in helping me out further -- though by
> all means, I
On Sun, Jun 16, 2013 at 3:55 AM, Cameron Simpson wrote:
> On 14Jun2013 20:12, Dennis Lee Bieber wrote:
> | [...] PowerShell has been
> | available as a download on WinXP and standard on Win7 [PS 3 is a
> | download for Win7, stock on real Win8].
> | While I'm not fluent in it, there are som
On Wed, Jun 19, 2013 at 11:18 AM, wrote:
> The second argument takes the tuple which determines which varialble(key) to
> use the comparator on. And the third determines whether to return the list in
> ascending or descending order.
That's not exactly correct. The arguments are listed in that
On Wed, Jun 19, 2013 at 4:57 AM, Antoon Pardon
wrote:
> I don't remember making such a claim. What I do remember is
> you among others claiming that the problem was not (so much)
> the troll (Nikos) but the others.
Count me among those who feel this way.
> And your last conclusion is unsound. Yo
On Wed, Jun 19, 2013 at 3:14 PM, arturo balbuena wrote:
> Hello guys...
> I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble
> with this blank space. I would be greatful if you help me. :)
>
> Here's my code:
>
> http://snipplr.com/view/71581/hangman/
>
> When I run the co
On Thu, Jun 20, 2013 at 11:19 AM, Chris Angelico wrote:
> On Fri, Jun 21, 2013 at 3:12 AM, rusi wrote:
>> Python (and all the other 'cool' languages) dont have gotchas because
>> someone malevolently put them there.
>> In most cases, the problem is seen too late and the cost of changing
>> entren
On Thu, Jun 20, 2013 at 3:41 AM, Antoon Pardon
wrote:
> There are two problems with your reasoning. The first is that you
> are equivocating on "expect". "Expect" can mean you will be surprised
> if it doesn't happen but it can also mean you will feel indignant or
> disappointed or something simil
On Fri, Jun 21, 2013 at 3:18 AM, Antoon Pardon
wrote:
> Op 21-06-13 04:40, Ian Kelly schreef:
>
>> On Thu, Jun 20, 2013 at 3:41 AM, Antoon Pardon
>> wrote:
>>> There are two problems with your reasoning. The first is that you
>>> are equivocating on &qu
On Fri, Jun 21, 2013 at 7:15 PM, Steven D'Aprano
wrote:
> On Fri, 21 Jun 2013 23:49:51 +0100, MRAB wrote:
>
>> On 21/06/2013 21:44, Rick Johnson wrote:
> [...]
>>> Which in Python would be the "MutableArgumentWarning".
>>>
>>> *school-bell*
>>>
>> I notice that you've omitted any mention of how yo
On Fri, Jun 21, 2013 at 7:15 PM, Rick Johnson
wrote:
>> > Let's imagine for a second if Python allowed mutable keys in
>> > a dictionary,
>> which it does
>
> Am i just to take your word for this? You cannot provide an
> example? Here, allow me to "break the ice":
>
> # Literal
> py> d = {
On Fri, Jun 21, 2013 at 7:37 PM, Chris Angelico wrote:
class HashableList(list):
> def __hash__(self):
> return 42
Hey, we both picked exactly the same example!
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Jun 22, 2013 at 10:49 AM, Dennis Lee Bieber
wrote:
> On Fri, 21 Jun 2013 19:27:42 -0600, Ian Kelly
> declaimed the following:
>
>>While we're at it, I would like to petition for a function
>>terminates(f, args) that I can use to determine whether a function
On Sat, Jun 22, 2013 at 3:50 PM, Борислав Бориславов
wrote:
> this doesent help me at all
It shows you how to include multiple statements in the body of the if
block. If you're having trouble getting it to work, then please copy
and paste the exact code that you're running for us along with the
On Sat, Jun 22, 2013 at 9:20 PM, Steven D'Aprano
wrote:
> * on the down side, automatic delegation of special double-underscore
> methods like __getitem__ and __str__ doesn't work with new-style classes.
I actually consider that an up side. Sure it's inconvenient that you
can't delegate all such
On Sat, Jun 22, 2013 at 11:23 PM, Steven D'Aprano
wrote:
> On Sat, 22 Jun 2013 22:27:10 -0600, Ian Kelly wrote:
>> I actually consider that an up side. Sure it's inconvenient that you
>> can't delegate all such methods at once just by overriding
>> __
On Sun, Jun 23, 2013 at 7:35 AM, Adam Jiang wrote:
> Another question raised here is that what is the proper way to refer
> to parent class? For example,
>
> class A(object):
> def __init__(self, arg):
> print "A"
>
> class B(A):
> def __init__(self, arg):
>
On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith wrote:
> One thing I've never understood about Python 2.x's multiple inheritance
> (mostly because I almost never use it) is how you do something like this:
>
> class Base1(object):
>def __init__(self, foo):
> self.foo = foo
>
> class Base2(obj
On Sun, Jun 23, 2013 at 11:08 AM, Ian Kelly wrote:
> On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith wrote:
>> am I missing something here?
>
> Yes, you're missing that super() does not simply call the base class,
> but rather the next class in the MRO for whatever the type o
On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano
wrote:
> On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote:
>
>> Incidentally, although super() is useful, it's not perfect, and this is
>> one of my grievances with it: that a user can, based upon the name, draw
On Sun, Jun 23, 2013 at 12:46 PM, Steven D'Aprano
wrote:
> All is not lost, there are ways to make your classes cooperative. The
> trick is to have your classes' __init__ methods ignore keyword arguments
> they don't know what to do with. object used to do the same thing, but it
> no longer does,
On Sun, Jun 23, 2013 at 12:50 PM, Steven D'Aprano
wrote:
> What else would you call a function that does lookups on the current
> object's superclasses?
Well, as James Knight points out in the "Super Considered Harmful"
article, the equivalent in Dylan is called "next-method", which isn't
a valid
On Mon, Jun 24, 2013 at 9:00 AM, Rotwang wrote:
> On 24/06/2013 07:31, Steven D'Aprano wrote:
>
>> I daresay that there are good reasons why new-style classes don't do the
>> same thing, but the point is that had the Python devs had been
>> sufficiently interested in keeping the old behaviour, and
On Mon, Jun 24, 2013 at 9:58 AM, Mark Janssen wrote:
>>> Mostly I'm saying that super() is badly named.
>>
>> What else would you call a function that does lookups on the current
>> object's superclasses?
>
> ^. You make a symbol for it. ^__init__(foo, bar)
On the one hand, eww.
On the other h
On Mon, Jun 24, 2013 at 1:52 PM, wrote:
> Syntax:
>
> fwhile X in ListY and conditionZ:
>
> The following would actually exactly as: for X in ListY:
>
> fwhile X in ListY and True:
>
> fwhile would act much like 'for', but would stop if the condition after the
> 'and' is no longer True.
>
> The
On Mon, Jun 24, 2013 at 1:52 PM, wrote:
> Syntax:
>
> fwhile X in ListY and conditionZ:
Also, this syntax is ambiguous. Take for example the statement:
fwhile X in ListA and ListB and ListC and ListD:
At which "and" does the iterable expression stop and the condition
expression begin?
--
htt
On Mon, Jun 24, 2013 at 3:01 PM, Ian Kelly wrote:
> On Mon, Jun 24, 2013 at 2:34 PM, Fábio Santos
> wrote:
>> This can probably be best achieved by adding to the existing for loop,
>> so maybe taking advantage of the existing for...if syntax and adding
>> for...whil
On Mon, Jun 24, 2013 at 2:34 PM, Fábio Santos wrote:
> This can probably be best achieved by adding to the existing for loop,
> so maybe taking advantage of the existing for...if syntax and adding
> for...while would be a better idea?
The for...if syntax only exists for comprehensions and generat
On Mon, Jun 24, 2013 at 4:41 PM, Fábio Santos wrote:
>
> On 24 Jun 2013 22:29, "Ian Kelly" wrote:
>>
>> On Mon, Jun 24, 2013 at 2:34 PM, Fábio Santos
>> wrote:
>> > This can probably be best achieved by adding to the existing for loop,
>> >
On Mon, Jun 24, 2013 at 4:35 PM, Chris Angelico wrote:
> On Tue, Jun 25, 2013 at 8:30 AM, Tim Chase
> wrote:
>> On 2013-06-25 07:38, Chris Angelico wrote:
>>> Python has no issues with breaking out of loops, and even has
>>> syntax specifically to complement it (the 'else:' clause). Use
>>> break
On Mon, Jun 24, 2013 at 6:41 PM, wu wei wrote:
> It's still possible by raising a StopIteration within the condition
> function:
>
> def is_part_of_header(x):
> if header_condition:
> return True
> else:
> raise StopIteration
Which is basically just tak
On Sat, Jun 22, 2013 at 8:40 AM, Antoon Pardon
wrote:
> Are you two guys now egging on Rick Johnson?
No. Rick is incorrigible, and I would have been surprised if he
responded to that anyway.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jun 24, 2013 at 2:33 PM, wrote:
> Ian,
>
> Regarding your first message breaks are anathema (for many) and your other
> alternative is complicated.
>
> Regarding your second post, anding of lists is allowed, but generally
> returns non-utile results, but point taken.
> I guess technically
On Tue, Jun 25, 2013 at 1:21 AM, Chris Angelico wrote:
> On Tue, Jun 25, 2013 at 2:20 PM, Benjamin Kaplan
> wrote:
>> The reason I was given (which I promptly ignored, of course) is that
>> it's "best practice" to only have one exit point for a block of code.
>> Only one way of terminating your l
On Sun, Jun 23, 2013 at 1:33 PM, Antoon Pardon
wrote:
> Op 23-06-13 18:35, Steven D'Aprano schreef:
>> Please don't. This is false economy. The time you save will be trivial,
>> the overhead of inheritance is not going to be the bottleneck in your
>> code, and by ignoring super, you only accomplis
On Sat, Jun 22, 2013 at 8:49 PM, Gene Heskett wrote:
> On Saturday 22 June 2013 22:46:51 christheco...@gmail.com did opine:
>
>> Writing simple program asking a question with the answer being
>> "yes"...how do I allow the correct answer if user types Yes, yes, or
>> YES?
>>
>> Thanks
>
> AND each
On Tue, Jun 25, 2013 at 2:31 PM, Joshua Landau
wrote:
> On 25 June 2013 21:22, Bryan Britten wrote:
>> Ah, I always forget to mention my OS on these forums. I'm running Windows.
>
> Supposedly, Windows has "more"
> [http://superuser.com/questions/426226/less-or-more-in-windows],
>
> For Linux+les
On Tue, Jun 25, 2013 at 3:58 PM, Mark Janssen wrote:
> Ah, and here we see the weakness in the object architecture that has
> evolved in the past decade (not just in Python, note). It hasn't
> really ironed out what end is what. Here's a proposal: the highest,
> most "parental", most general o
On Tue, Jun 25, 2013 at 4:17 PM, Chris Angelico wrote:
> The main problem is getting to the top/end of the call chain. Classic
> example is with __init__, but the same problem can also happen with
> other calls. Just a crazy theory, but would it be possible to
> construct a black-holing object tha
On Tue, Jun 25, 2013 at 4:38 PM, Mark Janssen wrote:
> Sorry my last message got sent prematurely. Retrying...
>
>> So instead of super(), you would have sub()? It's an interesting
>> concept, but I don't think it changes anything. You still have to
>> design your classes cooperatively if you e
On Tue, Jun 25, 2013 at 5:07 PM, Ian Kelly wrote:
> On Tue, Jun 25, 2013 at 4:38 PM, Mark Janssen
> wrote:
>> The issue of classes cooperating isn't as big as it seems, because
>> since you're working now from a useful, agreed-upon common base (the
>> non-
On Tue, Jun 25, 2013 at 5:19 PM, Mark Janssen wrote:
>>> Combining integers with sets I can make
>>> a Rational class and have infinite-precision arithmetic, for example.
>>
>> Combining two integers lets you make a Rational.
>
> Ah, but what is going to group them together? You see you've alread
On Tue, Jun 25, 2013 at 7:07 PM, Mark Janssen wrote:
>> When you inherit a "set" to make a Rational, you're making the
>> statement (to the interpreter, if nothing else) that a Rational is-a
>> set.
>
> No you don't *inherit* a set to make a Rational, although you gain a
> set to make it.
Okay, t
On Mon, Jun 24, 2013 at 7:37 AM, Antoon Pardon
wrote:
> What do you mean with not a participant in the past? As far
> as I can see his first appearance was in dec 2011. That is
> over a year ago. It also seems that he always find people
> willing to engage with him. Is how the group treats him
> n
On Wed, Jun 26, 2013 at 5:54 PM, Steven D'Aprano
wrote:
> No. But "the current object" is not Base1, but an instance of Derived,
> and Base2 *is* an ancestor of Derived. Perhaps if I had said "self"
> instead of current object, you wouldn't have made this error. If so, I
> apologise for confusing
1 - 100 of 3558 matches
Mail list logo