Skip to content

No need to invoke classmethods through self.__class__#1198

Merged
nedbat merged 1 commit intomasterfrom
ned/fix-calling-classmethods
Oct 3, 2013
Merged

No need to invoke classmethods through self.__class__#1198
nedbat merged 1 commit intomasterfrom
ned/fix-calling-classmethods

Conversation

@nedbat
Copy link
Contributor

@nedbat nedbat commented Oct 2, 2013

@jtauber you agree, right?

@jtauber
Copy link
Contributor

jtauber commented Oct 3, 2013

Wouldn't it depend if the class method itself is assuming the class for the first arg?

@nedbat
Copy link
Contributor Author

nedbat commented Oct 3, 2013

classmethods get the class as the first arg even if called on self:

>>> class Foo(object):
...  @classmethod
...  def cm(cls):
...   print cls
... 
>>> Foo().cm()
<class '__main__.Foo'>
>>> Foo.cm()
<class '__main__.Foo'>

@jtauber
Copy link
Contributor

jtauber commented Oct 3, 2013

I never knew that :-)

nedbat added a commit that referenced this pull request Oct 3, 2013
No need to invoke classmethods through self.__class__
@nedbat nedbat merged commit 2a11ff0 into master Oct 3, 2013
@nedbat nedbat deleted the ned/fix-calling-classmethods branch October 3, 2013 17:28
jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Sep 16, 2016
…anslations-for-multilingual-support

Fix translation for cert name in dashboard openedx#1185
Agrendalath added a commit to open-craft/openedx-platform that referenced this pull request Oct 19, 2018
* [MCKIN-8418] WIP: Optimize UsersSocialMetrics.get API

* [MCKIN-8418] Support flagging threads and comments

* Bump versions.
iloveagent57 pushed a commit that referenced this pull request Feb 26, 2024
…1198)

`make dev.dbcopyall8` doesn't work unless the mysql containers have been
started and are ready to run. This is not the only place we need to wait
for a functional check on a container, so in this commit I've gone ahead
and started a utility for doing so.

This first pass only supports MySQL, but we should at least add Mongo as
well, as that's also needed in one of the provisioning scripts.

I've moved the _db_copy8_targets from being an order-only prerequisite
to being a recursive make call. I'm not sure why the order-only syntax
was in use here, but in any case I needed to add in a script call
before those targets were called, so it's likely moot.

Also:

- Drop unneeded `bash -c` wrappers from db copy docker exec calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants