set the can_comment
351753
private void fillCanComment(JsonObject summary) {
    if (summary != null && summary.get("can_comment") != null) {
      canComment = summary.get("can_comment").asBoolean();
    }

    if (canComment == null && openGraphCanComment != null) {
      canComment = openGraphCanComment;
    }
  }
1205557
def set_comments(self):
        """"""
        try:
            self.comments = self.soup.find('comments').string
        except AttributeError:
            self.comments = None
514219
def CommentContext(self):
        """"""
        old_context = self.__comment_context
        self.__comment_context = True
        yield
        self.__comment_context = old_context
141754
def allow(self, comment, content_object, request):
        """"""
        # Tests for cookie:
        if settings.COOKIE_KEY not in request.COOKIES \
            and (settings.DISCARD_SPAM or settings.DISCARD_NO_COOKIE):
                return False
        elif settings.COOKIE_KEY not in request.COOKIES:
            comment.is_removed = True
            comment.is_public = False
            return True
        return True
814047
public function setComment(string $comment): void
    {
        $this->desc = '';
        $this->tags = [];
        $this->comment = $comment;

        $this->parseComment($comment);
    }
801352
def set_settings(self, subreddit, title, public_description='',
                     description='', language='en', subreddit_type='public',
                     content_options='any', over_18=False, default_set=True,
                     show_media=False, domain='', domain_css=False,
                     domain_sidebar=False, header_hover_text='',
                     wikimode='disabled', wiki_edit_age=30,
                     wiki_edit_karma=100,
                     submit_link_label='', submit_text_label='',
                     exclude_banned_modqueue=False, comment_score_hide_mins=0,
                     public_traffic=False, collapse_deleted_comments=False,
                     spam_comments='low', spam_links='high',
                     spam_selfposts='high', submit_text='',
                     hide_ads=False, suggested_comment_sort='',
                     key_color='',
                     **kwargs):
        
        data = {'sr': subreddit.fullname,
                'allow_top': default_set,
                'comment_score_hide_mins': comment_score_hide_mins,
                'collapse_deleted_comments': collapse_deleted_comments,
                'description': description,
                'domain': domain or '',
                'domain_css': domain_css,
                'domain_sidebar': domain_sidebar,
                'exclude_banned_modqueue': exclude_banned_modqueue,
                'header-title': header_hover_text or '',
                'hide_ads': hide_ads,
                'key_color': key_color,
                'lang': language,
                'link_type': content_options,
                'over_18': over_18,
                'public_description': public_description,
                'public_traffic': public_traffic,
                'show_media': show_media,
                'submit_link_label': submit_link_label or '',
                'submit_text': submit_text,
                'submit_text_label': submit_text_label or '',
                'suggested_comment_sort': suggested_comment_sort or '',
                'spam_comments': spam_comments,
                'spam_links': spam_links,
                'spam_selfposts': spam_selfposts,
                'title': title,
                'type': subreddit_type,
                'wiki_edit_age': six.text_type(wiki_edit_age),
                'wiki_edit_karma': six.text_type(wiki_edit_karma),
                'wikimode': wikimode}

        if kwargs:
            msg = 'Extra settings fields: {0}'.format(kwargs.keys())
            warn_explicit(msg, UserWarning, '', 0)
            data.update(kwargs)
        evict = self.config['subreddit_settings'].format(
            subreddit=six.text_type(subreddit))
        self.evict(evict)
        return self.request_json(self.config['site_admin'], data=data)
1206046
def comment(opts)
      opts = opts.merge(:sale_id => self.sale_id)
      Twocheckout::API.request(:post, 'sales/create_comment', opts)
    end
921180
def refine_cand(candsfile, candnum, threshold):
    

    reproduce.refine_cand(candsfile, candnum=candnum, threshold=threshold)
312270
def set_quoted_text(self, quoted_text):
        """"""
        self.quoted_text = quoted_text
        self.line_comment = False
        return self
287587
def on_comment_entered(self):
        """"""
        text_edit = self.findChild(QtWidgets.QWidget, "CommentBox")
        comment = text_edit.text()

        # Store within context
        context = self.controller.context
        context.data["comment"] = comment

        placeholder = self.findChild(QtWidgets.QLabel, "CommentPlaceholder")
        placeholder.setVisible(not comment)
321339
public void setComment(String comment) {
        if (comment != null) {
            this.comment = zc.getBytes(comment);
            if (this.comment.length > 0xffff)
                throw new IllegalArgumentException("ZIP file comment too long.");
        }
    }
115085
def add_comment(self, body, allow_create=False, allow_hashes=False,
                    summary=None):
        ""

        if allow_hashes:
            raise ValueError('allow_hashes not implemented for %s yet' % (
                self.__class__.__name__))
        if self.thread_id is None:
            self.thread_id = self.lookup_thread_id()
        if not os.path.exists(self.thread_id):
            if not allow_create:
                raise KeyError(self.topic)
            with open(self.thread_id, 'a', newline='') as fdesc:
                csv.writer(fdesc).writerow(self.header)

        with open(self.thread_id, 'a', newline='') as fdesc:
            writer = csv.writer(fdesc)
            writer.writerow([self.user, datetime.datetime.utcnow(), summary,
                             body, ''])
444506
def _add_comment(self, thing_id, text):
        
        def add_comment_helper(self, thing_id, text):
            data = {'thing_id': thing_id,
                    'text': text}
            retval = self.request_json(self.config['comment'], data=data,
                                       retry_on_error=False)
            return retval

        if thing_id.startswith(self.config.by_object[objects.Message]):
            decorator = decorators.restrict_access(scope='privatemessages')
        else:
            decorator = decorators.restrict_access(scope='submit')
        retval = decorator(add_comment_helper)(self, thing_id, text)
        # REDDIT: reddit's end should only ever return a single comment
        return retval['data']['things'][0]
89619
def comment (self, s, **args):
        """"""
        self.writeln(s=u"# %s" % s, **args)
907736
def add_comment(self, comment):
        
        if not comment:
            return

        self.__comments[comment.name] = comment
        self.comment_added_signal(self, comment)
609019
function comment(editor, range, modelType) {
	const commentParts = modelComments[modelType];
	editor.setTextInBufferRange(new Range(range.end, range.end), ` ${commentParts.after}`);
	editor.setTextInBufferRange(new Range(range.start, range.start), `${commentParts.before} `);
}
333581
def comment_handle(self, original, loc, tokens):
        """"""
        internal_assert(len(tokens) == 1, "invalid comment tokens", tokens)
        ln = self.adjust(lineno(loc, original))
        internal_assert(lambda: ln not in self.comments, "multiple comments on line", ln)
        self.comments[ln] = tokens[0]
        return ""