I know the Python syntax pretty well. I know a lot of the libraries
and tools. When I see professional Python programmer's code, I am
often blown away with the code. I realized that even though I know the
language, I know nothing about using it effectively.
I would like to start using Python more
On Aug 26, 8:44 am, Chris Angelico wrote:
> On Fri, Aug 26, 2011 at 10:33 PM, Travis Parks wrote:
> > I know the Python syntax pretty well. I know a lot of the libraries
> > and tools. When I see professional Python programmer's code, I am
> > often blown away with the
On Aug 26, 9:28 am, Chris Angelico wrote:
> On Fri, Aug 26, 2011 at 10:58 PM, Travis Parks wrote:
> > I haven't gotten to the point where I can truly use the language
> > features to my full advantage. I haven't seen enough "tricks" to be
> > effec
On Aug 26, 11:12 am, Roy Smith wrote:
> In article
> <2309ec4b-e9a3-4330-9983-1c621ac16...@ea4g2000vbb.googlegroups.com>,
> Travis Parks wrote:
>
> > I know the Python syntax pretty well. I know a lot of the libraries
> > and tools. When I see professional
I am trying to write an algorithms library in Python. Most of the
functions will accept functions as parameters. For instance, there is
a function called any:
def any(source, predicate):
for item in source:
if predicate(item):
return true;
return false;
There are some
On Aug 28, 5:31 pm, Chris Angelico wrote:
> On Mon, Aug 29, 2011 at 7:20 AM, Travis Parks wrote:
>
> > if source is None: raise ValueError("")
> > if not isinstanceof(source, collections.iterable): raise TypeError("")
> > if not callable(predicate):
On Aug 29, 2:30 am, Nobody wrote:
> On Sun, 28 Aug 2011 14:20:11 -0700, Travis Parks wrote:
> > More importantly, I want to make sure that
> > predicate is callable, accepting a thing, returning a bool.
>
> The "callable" part is do-able, the rest isn't.
>
On Aug 29, 1:42 pm, Ian Kelly wrote:
> On Mon, Aug 29, 2011 at 10:45 AM, Travis Parks wrote:
> > I wanted to allow for calls like this:
>
> > extend(range(0, 1000)).map(lambda x: x * x).where(lambda x: x % 2 ==
> > 0).first(lambda x: x % 7 == 0)
>
> > It
I am writing a simple algorithms library that I want to work for both
Python 2.7 and 3.x. I am writing some functions like distinct, which
work with dictionaries under the hood. The problem I ran into is that
I am calling itervalues or values depending on which version of the
language I am working
I was a little disappointed the other day when I realized that
closures were read-only. I like to use closures quite a bit.
Can someone explain why this limitation exists? Secondly, since I can
cheat by wrapping the thing being closure-ified, how can I write a
simple wrapper that has all the same
On Aug 31, 1:18 pm, Chris Rebert wrote:
> On Wed, Aug 31, 2011 at 9:45 AM, Travis Parks wrote:
> > I was a little disappointed the other day when I realized that
> > closures were read-only. I like to use closures quite a bit.
>
> Assuming I'm intuiting your quest
On Aug 31, 1:51 pm, Travis Parks wrote:
> On Aug 31, 1:18 pm, Chris Rebert wrote:
>
> > On Wed, Aug 31, 2011 at 9:45 AM, Travis Parks
> > wrote:
> > > I was a little disappointed the other day when I realized that
> > > closures were read-only
On Aug 31, 2:18 pm, Ian Kelly wrote:
> On Wed, Aug 31, 2011 at 12:02 PM, Travis Parks wrote:
> > Am I doing something wrong, here? nonlocal isn't registering. Which
> > version did this get incorporated?
>
> 3.0
Ah, okay. It would be really useful for unit testing. Unf
On Aug 31, 2:03 pm, "bruno.desthuilli...@gmail.com"
wrote:
> On 31 août, 18:45, Travis Parks wrote:
>
> > I was a little disappointed the other day when I realized that
> > closures were read-only. I like to use closures quite a bit.
>
> They are not _strictly_
On Aug 31, 7:37 pm, Gregory Ewing wrote:
> Ian Kelly wrote:
> > if sys.version_info < (3,):
> > getDictValues = dict.itervalues
> > else:
> > getDictValues = dict.values
>
> > (which is basically what the OP was doing in the first place).
>
> And which he seemed to think didn't work for so
some feedback. I want
to know if I am following conventions (overall style and quality of
code).
Thanks,
Travis Parks
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 2, 12:36 pm, "Gabriel Genellina"
wrote:
> En Wed, 31 Aug 2011 22:28:09 -0300, Travis Parks
> escribi :
>
> > On Aug 31, 7:37 pm, Gregory Ewing wrote:
> >> Ian Kelly wrote:
> >> > if sys.version_info < (3,):
>
On Sep 2, 4:09 pm, Ian Kelly wrote:
> On Fri, Sep 2, 2011 at 10:59 AM, Travis Parks wrote:
> > Hello:
>
> > I am working on an algorithms library. It provides LINQ like
> > functionality to Python iterators. Eventually, I plan on having
> > feaures that work
On Sep 2, 6:49 pm, Travis Parks wrote:
> On Sep 2, 4:09 pm, Ian Kelly wrote:
>
>
>
>
>
> > On Fri, Sep 2, 2011 at 10:59 AM, Travis Parks
> > wrote:
> > > Hello:
>
> > > I am working on an algorithms library. It provides LINQ like
> > &
On Sep 3, 12:35 am, Chris Torek wrote:
> In article <18fe4afd-569b-4580-a629-50f6c7482...@c29g2000yqd.googlegroups.com>
> Travis Parks wrote:
>
> >[Someone] commented that the itertools algorithms will perform
> >faster than the hand-written ones. Are these algorit
bout it. My guess is that there would be a severe penalty
for crossing process boundaries... but any insights would be
appreciated.
Thanks,
Travis Parks
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 5, 4:11 pm, Travis Parks wrote:
> Hello:
>
> A new guy showed up at work a few weeks ago and has started talking
> about replacing a 6 month old project, written in ASP.NET MVC, with an
> open source solution that can handle massive scaling. I think his
> primary concern
On Nov 7, 12:44 pm, John Gordon wrote:
> In John Gordon writes:
>
> > In <415d875d-bc6d-4e69-bcf8-39754b450...@n18g2000vbv.googlegroups.com>
> > Travis Parks writes:
> > > Which web frameworks have people here used and which have they found
> > > t
e doesn't look like it handles time zones at all. I guess, is
there a way to tell xmlrpclib to include time zones when parsing date
times?
Thanks,
Travis Parks
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 8, 12:09 am, Lie Ryan wrote:
> On 11/08/2011 01:21 PM, Travis Parks wrote:
>
>
>
>
>
> > On Nov 7, 12:44 pm, John Gordon wrote:
> >> In John Gordon writes:
>
> >>> In<415d875d-bc6d-4e69-bcf8-39754b450...@n18g2000vbv.googlegroups.
On Nov 11, 7:20 pm, Travis Parks wrote:
> I am trying to connect to Marchex's a call tracking software using
> xmlrpclib. I was able to get some code working, but I ran into a
> problem dealing with transfering datetimes.
>
> When I construct a xmlrpclib.ServerPro
generated because I see state transition tables, which I doubt someone
built by hand.
Any help would be greatly appreciated. It will be cool to see how the
interpreter works internally. I am still wonder whether designing the
language (going on 4 months now) will be harder than implementing it.
Than
On Nov 21, 12:44 am, Steven D'Aprano wrote:
> On Mon, 21 Nov 2011 13:33:21 +1100, Chris Angelico wrote:
> > What's your language's "special feature"? I like to keep track of
> > languages using a "slug" - a simple one-sentence (or less) statement of
> > when it's right to use this language above o
On Nov 22, 1:37 pm, Alan Meyer wrote:
> On 11/20/2011 7:46 PM, Travis Parks wrote:
>
> > Hello:
>
> > I am currently working on designing a new programming language. ...
>
> I have great respect for people who take on projects like this.
>
> Your chances of po
On Nov 26, 1:53 pm, Rick Johnson wrote:
> On Nov 20, 6:46 pm, Travis Parks wrote:
>
> > Hello:
>
> > I am currently working on designing a new programming language. It is
> > a compiled language, but I still want to use Python as a reference.
> > Python has a l
On Nov 27, 6:55 pm, Steven D'Aprano wrote:
> On Sun, 27 Nov 2011 14:21:01 -0800, Travis Parks wrote:
> > Personally, I find a lot of good things in Python. I thinking tabs are
> > out-of-date. Even the MAKE community wishes that the need for tabs would
> > go away and
On Nov 28, 2:32 pm, Ian Kelly wrote:
> On Sun, Nov 27, 2011 at 4:55 PM, Steven D'Aprano
>
> wrote:
> >> My language combines generators and collection initializers, instead of
> >> creating a whole new syntax for comprehensions.
>
> >> [| for i in 0..10: for j in 0.10: yield return i * j |]
>
> >
On Nov 28, 3:40 pm, Gregory Ewing wrote:
> Travis Parks wrote:
> > I thinking tabs are
> > out-of-date. Even the MAKE community wishes that the need for tabs
> > would go away
>
> The situation with make is a bit different, because it
> *requires* tabs in cer
On Nov 28, 5:24 pm, Steven D'Aprano wrote:
> On Mon, 28 Nov 2011 12:32:59 -0700, Ian Kelly wrote:
> > On Sun, Nov 27, 2011 at 4:55 PM, Steven D'Aprano
> > wrote:
> [...]
> >>> Lambdas and functions are the same thing in my language, so no need
> >>> for a special keyword.
>
> >> That does not fol
On Nov 28, 8:49 pm, Chris Angelico wrote:
> On Tue, Nov 29, 2011 at 11:54 AM, DevPlayer wrote:
> > To me, I would think the interpreter finding the coder's intended
> > indent wouldn't be that hard. And just make the need for consistant
> > spaces or tabs irrevelent simply by reformatting the ind
On Nov 28, 5:57 pm, Steven D'Aprano wrote:
> On Mon, 28 Nov 2011 13:29:06 -0800, Travis Parks wrote:
> > Exception handling is one of those subjects few understand and fewer can
> > implement properly in modern code. Languages that don't support
> > exceptions as
36 matches
Mail list logo